-
Notifications
You must be signed in to change notification settings - Fork 215
Stops CMake build output folders being named "default" #1084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@jonahgraham , The fixes are not yet in place, but I have marked where I think changes should happen. There are a number of places in CDT code where the following line appears: names.add(IBuildConfiguration.DEFAULT_CONFIG_NAME); I need to investigate whether these can be removed too. |
Please disregard this part of the Test Results method in #1084 (comment) - the removed tests are simply not run on this PR to make build run faster. #1002 is umbrella for adding better auto-comments to PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case you have the cdt-lsp projects closed, make sure to take into account how it uses ICBuildConfigurationManager.getBuildConfiguration. For example here
...ipse.cdt.core.tests/model/org/eclipse/cdt/core/build/DefaultBuildConfigurationNameTests.java
Show resolved
Hide resolved
195e349
to
804994f
Compare
Hi @jonahgraham , |
804994f
to
a9c6c32
Compare
@jonahgraham , I'm very pleased with how this work has gone because I believe quarantining the default build config to the noConfigs bin is totally the correct thing to do. It stops the "default" name appearing in the build output directory sometimes. More importantly I think the correct build config for the active launchbar controls is being set straight away now, without relying on a build action first. I have a little bit of tidying to do to the junits, but I think functionally they are complete. |
The failing test is known flaky - #1065 - I have restarted the build anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM - set to ready to review when you are satisfied.
...e.tests/model/org/eclipse/cdt/core/build/DefaultBuildConfigurationNameTestsNoToolchains.java
Outdated
Show resolved
Hide resolved
...ipse.cdt.core.tests/model/org/eclipse/cdt/core/build/DefaultBuildConfigurationNameTests.java
Outdated
Show resolved
Hide resolved
...ipse.cdt.core.tests/model/org/eclipse/cdt/core/build/DefaultBuildConfigurationNameTests.java
Outdated
Show resolved
Hide resolved
a9c6c32
to
b33baf3
Compare
@jonahgraham , |
The default IBuildConfiguration is no longer used by projects that use ICBuildConfigurationProvider. For CMake, Makefile and other Core Build projects the build output folder is sometimes named "default" rather than the pattern toolName.launchMode.toolchain OS.toolchain Arch.launchTarget Id (eg: cmake.debug.win32.x86_64.Local). PR eclipse-cdt#1076 exposes new API (ICBuildConfigurationProvider.getCBuildConfigName) to encourage this naming pattern. The "sometimes" is variable and often happens when a project is first created when the active launch target is Local and the launch mode is "run", but not always. This gives a random, inconsistent impression to CDT. The Platform project always contains a IBuildConfiguration with the name IBuildConfiguration.DEFAULT_CONFIG_NAME. It seems the original Core Build system design went to some length to fit in with this and always make use of this IBuildConfiguration when pairing it with a new ICBuildConfiguration. With this PR, this no longer happens, allowing CDT code to be simplified and the build folder naming made consistent, always adhering to ICBuildConfigurationProvider.getCBuildConfigName. Addresses Issue: CDT CMake Improvements eclipse-cdt#1000, IDE-82683-REQ-024 Default CMake build folder
b33baf3
to
5539a6e
Compare
This looks good to me - it exposes a pre-existing bug in cdt-lsp I have raised here eclipse-cdt/cdt-lsp#435 |
The default IBuildConfiguration is no longer used by projects that use ICBuildConfigurationProvider.
For CMake, Makefile and other projects the build output folder is sometimes named "default" rather than the pattern
toolName.launchMode.toolchain OS.toolchain Arch.launchTarget Id (eg: cmake.debug.win32.x86_64.Local). PR #1076 exposes new API (ICBuildConfigurationProvider.getCBuildConfigName) to encourage this naming pattern.
The "sometimes" is variable and often happens when a project is first created when the active launch target is Local and the launch mode is "run", but not always. This gives a random, inconsistent impression to CDT.
The Platform project always contains a IBuildConfiguration with the name IBuildConfiguration.DEFAULT_CONFIG_NAME. It seems the original Core Build system design went to some length to fit in with this and always make use of this IBuildConfiguration when pairing it with a new ICBuildConfiguration.
With this PR, this no longer happens, allowing CDT code to be simplified and the build folder naming made consistent, always adhering to ICBuildConfigurationProvider.getCBuildConfigName.
Addresses Issue: CDT CMake Improvements #1000, IDE-82683-REQ-024 Default CMake build folder