Summary:
- Add some new API to make it easier for ISVs to provide defaults.
- Fully connect UI elements to CMake build process
- Add some missing UI elements (such as customizing generator)
- CMake generator default within CDT changed to Ninja
Details:
Add API to set CMake generator default (eg Ninja) ISV can set
their desired CMake generator by overriding
`CMakeBuildConfiguration.getDefaultProperties`. ISVs can also further
fine tune the build process by overriding
`CMakeBuildConfiguration.getDefaultProperties`
Remove API `IOsOverrides` and related code. `IOsOverrides` was a partial
implementation to achieve builds in Docker containers, however the
work was not complete and it the extra code was complicating some
basic use cases of setting defaults
Add support for all generators to CMake build settings UI page by
using a Combo instead of radio buttons. The non-deprecated generators
that are built-in to CDT populate the Combo, but additional generators
can be manually entered in the Combo.
Rename clean command to clean target to better reflect its use as
the argument passed to cmake's --target command line.
Add all target for the argument passed to cmake's --target
command line when doing a normal build.
Clarify usage of UI overrides and change the UI to be "use defaults"
(i.e. invert the checkbox). This is a **breaking** change as it means
user projects that were using UI overrides will revert to using defaults.
This is done on purpose as so many little things have changed in CMake
settings, that reverting to defaults on upgrade seems like a logical
decision. In addition *use defaults* matches the other GUIs in Eclipse,
for example the MBS build command settings.
Populate all defaults in getDefaultProperties() so that all CMake build
settings are displayed as used (greyed out) and can be used as a starting
point when editing settings.
Simplify some of the code in CMakeBuildTab.
Fix parsing of extra args so that quoted strings work.
Refactored manual tests document and brought it up to date.
Correct command line option for CMake's --warn-unused-vars
Correct command line option for CMake's --warn-uninitialized
Overall this is an API breaking change and the CHANGELOG-API.md has been
updated with all the API changes in and around ICMakeProperties,
including fixing typos in WarnUninitialized methods.
Fixes#1055Fixes#818
Part of #1000
Co-authored-by: Jonah Graham <jonah@kichwacoders.com>
This will try to rerun failed tests up to three times.
The side effect is that a very broken test run will take much
longer to complete, but it is hoped for those few
https://github.com/eclipse-cdt/cdt/labels/flakytests in the system
this will resolve the issue.
Note this is applied only to the GitHub actions run, not to Jenkins
run where we build releases from. Ideally we don't want to do that
there.
In a future commit we can consider removing flakyTest from -DexcludedGroups
too.
See [surefire docs](https://maven.apache.org/surefire/maven-surefire-plugin/examples/rerun-failing-tests.html)
for details.
On GitHub I see fails in resume[gdb] (org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest)
with this output:
```
Terminate failed
org.eclipse.debug.core.DebugException: Terminate failed
at org.eclipse.debug.core.Launch.terminate(Launch.java:300)
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunch.terminate(GdbLaunch.java:313)
at org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase.doAfterTest(BaseTestCase.java:662)
at org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest.doAfterTest(MIRunControlTest.java:133)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.RunAfters.invokeMethod(RunAfters.java:46)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.lang.Thread.run(Thread.java:1583)
Contains: Terminate failed
Contains: Terminate failed
790,475 "resume[gdb]" requesting gdb. Launched gdb 15.0.50.20240403.
```
which is insufficient to diagnose what is happening.
Part of #816
"script" field of a breakpoint used to be output as a tuple (<= GDB 12),
though it is a list. There are cases of flags that can be applied to
get old or new behaviour too.
This code handles both cases transparently.
See https://sourceware.org/bugzilla/show_bug.cgi?id=24285
Part of #816
This test sometimes hangs when run a lot. As best as I can tell this
is a Ubuntu problem, rather than a gdb problem as it only fails on
Ubuntu 24.04, but I am not sure. I cannot reproduce the problem
when using the UI.
Part of #816
From GDB news:
print
Printing of floating-point values with base-modifying formats like
/x has been changed to display the underlying bytes of the value in
the desired base. This was GDB's documented behavior, but was never
implemented correctly.
This commit updates the tests to accomodate GDB's change.
Fixes#210
Without the return, this code would core dump, depending
on compiler version. The compiler was generating a warning
too about the missing return.
Part of #816
The tests were relying on specific number of executable lines
in a function. However on some gdb/gcc combinations stopping
at a function stops at the line with the `{` and some
on the first line witin that function. Much of the tests
here assumed that latter. By using line tags we don't need
to worry about exact number of executable lines between entry
and area of interest. And by placing first line of code on
the same line as the opening `{` of the function, we can
have consistent stop locations when stepping into a function.
Part of #816
The combination of gcc 9.4 and gdb 9.2 in Ubuntu 20.04 have a few
minor test issues that seem to be bugs in gdb that have been since
fixed.
Part of #816
In issue #1000 a lot of the work is on exposing a better API to ISVs.
This new project serves these purposes:
- Ensure the exposed API works in practice
- Example for ISVs to use if they want to extend CMake
- Provide an in-tree example of the API in use, so future editors of
CDT have better chance of understanding *why* items are done as
they are.
PR #1010 added the ability to extend CMakeBuildConfiguration and
CMakeBuildConfigurationProvider by making the classes public
API, they used to be internal API.
This change makes it easier to reuse the code in the provider
and configuration by allowing extenders to provide their own
implementations of CMakeBuildConfiguration. This has been
achieved by adding createCMakeBuildConfiguration methods to
control which CMakeBuildConfiguration is constructed.
Follow up to #1010
In #974 I removed activities we were not using anymore, but it turns
out if LaunchUtils.enableActivity is called on a removed id, strange
things happen, such as other activities incorrectly being enabled.
This may be a bug in platform, or just undefined behavior. But because
extenders do have calls to LaunchUtils.enableActivity in their code,
leave the empty activity ids behind.
Fixes#1044
On a recent update to the target platform, the DSF-GDB tests
did not run because none of the changes matched the dsf
filter. Going forward, include running DSF tests when any
releng changes happen.
This replaces commit 8d0642568c. That commit ran the tests
all the time, which was too slow.
Part of #1037
the rest of Eclipse now uses UTF-8 as default encoding.
The tm.terminal code reverts to null when the encoding
begins with "Default" and this leads to UTF-8 being
selected from Charset.defaultEncoding instead of ISO-8859
when the displayed default value is selected.
Co-authored-by: Philipp SALZGEBER <philipp.salzgeber@bachmann.info>
For Core Build System local debug target. If there is no absolute path
set in the Debugger tab of the launch configuration, try to find the
debugger first in the selected toolchain. If the debugger is not found
in the toolchain, let GdbLaunch search in PATH.
If an absolute path is set, GdbLaunch will use that.
Fixes#1008
For ISV integration/extension to CDT CMake, it is necessary to extend
several non-API classes (eg: CMakeBuildConfiguration,
CMakeBuildConfigurationProvider). This would cause "Discouraged access:
The type XXX is not API" warnings.
The classes have now been made API so can be extended without warnings.
Addresses Issue: CDT CMake Improvements #1000, IDE-82683-REQ-017
Extending CMakeBuildConfiguration
This was supposed to be a check to ensure adoc generation was
working, but it interferes with the overall check code cleanliness
as it leads to jgit dirty errors.
The generation of the docs is done as part of the build too, so
it is redundant to do them here.
When we decided to delay CDT 12.0 by 3 months it also meant that
the desired target was 2024-12, this commit makes this change
across the target platform
- Migrate all getting_started from html to adoc
- Document (in README.md) notes on migrating html to adoc
- Reorganize generation of adoc slightly so that
- all directories can be generates at once
- output suffix changed to htm so that migrated files
exist at the same URL on help.eclipse.org
- Add generation to the cleanliness checks to ensure that the
html matches adoc
- Manage the adoc headers with a script as that is a large section
of copy-pasted code on each adoc file (see README + adoc-headers.txt)
- Move maven version info to pluginManagement (consistency with other
maven plug-ins)
- New profile "asciidoc-auto-refresh" which will auto build the
files as edited.
Prerequisite of #992
Beta versions of maven plugins are omitted from this
upgrade.
A new version of Tycho brings in an update ECJ which means some
of the class files are different, hence the need to bump versions
of bundles too.
A new calendar year brings an update to Copyrights
The CDT Debug Activites was originally added when we had two
distinct debuggers in CDT, the DSF one and the CDI one. To
eliminate confusion the preferences for the respective
debug infrastructures were only displayed if users actually
ran such a debug session.
Now with just one debug infrastructure, we should always display
the preference pages. It also removes some confusion that some
preference pages weren't visible until after you started the
debug session. So for example, users couldn't turn on or off
a bunch of default settings until after creating and launching
a debug session.
I have left the enableActivity call in GdbLaunchDelegate in
case any extenders were hiding some of their UI behind that key.
The only exception in the above is the View Performance preference
page which was misplaced in the top level Run/Debug preference
tree, even though it is CDT specific. That preference page has
been re-parented to C/C++ -> Debug
Fixes https://github.com/eclipse-cdt/cdt/issues/972