1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00
Commit graph

3198 commits

Author SHA1 Message Date
Torbjörn Svensson
c4920f78f9 Bug 578367: Include the .css files in the built jar file
Contributed by STMicroelectronics

Change-Id: Ia7381071d1e8b806434ab4633549eb1a5177a584
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-03-31 14:41:22 +02:00
Jonah Graham
96f928152f Bug 579138 - Project dependencies are not built in the correct order
Fixing the issue where circular dependencies cause stack overflow.

Change-Id: I4ca87eb4e8ccb82b25f85d1cea04fc0d4ddd60c0
Signed-off-by: Umair Sair <umair_sair@hotmail.com>
2022-03-08 17:05:13 -05:00
Jonah Graham
cb1228180c Bug 578367: Add missing dark color definitions for autotools and makefiles
The colors chosen were based where possible on the colors of the CDT
main editor (org.eclipse.cdt.ui/css/e4-dark_cdt.css) for similar
syntax/semnatic elements.

Change-Id: Iea6ccb481b8d1b16aa2d6dda16e44b2512662fa0
2022-01-25 15:25:27 -05:00
Jonah Graham
e9025adc2d Bug 578367: Prepare for CDT 10.6.0 dev
Change-Id: Ibcdfb5e3aa1bbd47cd4c53e1a7be6d69dbe92c81
2022-01-25 15:25:27 -05:00
Jonah Graham
cf00e4b27e Bug 578187: Don't discard make arguments
If a user set the make arguments manually to what the automatic
arguments would have been if enabled, they would be discarded. This
change does not do that bit of magic anymore because the user
now (since Bug 568397) edits the build command and arguments
separately so less magic needs to happen in the code.

This is a follow-up to Bug 568397.

Change-Id: Ie8f51cbb86133fc4a9506913743613712e93d881
2022-01-12 18:57:12 -05:00
Jonah Graham
640dc53892 [releng] Bump version numbers for all modified projects
Change-Id: I0d78c550512d8e63374bf1bc3a53f80e5d387e31
2022-01-12 18:57:12 -05:00
Jonah Graham
431e5ffd23 [releng] Bump end year on copyright on all modified features
Change-Id: I0d35eb6514d87fb6dcba0a284f58963b80861d51
2022-01-12 18:57:12 -05:00
Jonah Graham
dbd7558f17 [releng] Bump to CDT version 10.6.0
Change-Id: I28629cdfb0906ce7f1b33a88cbbd55521afc8f6b
2022-01-12 14:07:45 -05:00
Jonah Graham
d3ad918c14 [releng] Update help-docs-eclipserun-repo in root pom.xml
and:
- bump versions of all the docs plug-ins.
- improve comment so that next person can do it more easily
- change to using https in the URL

Change-Id: I62bd970f03e1ce081d4655ddbf6c742be2623acd
2021-12-14 11:17:55 -05:00
Christian Walther
f138ad10e8 Bug 575490: "No rule" after removing last source file from root
Include the top-level subdir.mk only when one was actually generated
(i.e. when there are source files there), just like for all other
subdir.mk, otherwise a stale one from earlier when there were source
files that have since been removed may be picked up, causing "No rule to
make target" errors.

In some cases (from bug 303953), the removal would be noticed and the
stale subdir.mk be overwritten by a correct empty one, avoiding the
error, but not in the following cases:
- When CommonBuilder.performCleanning() decides that a full rebuild is
needed, regenerateMakefiles() is called instead of generateMakefiles(),
which doesn't get the delta.
- When the refresh in which Eclipse notices the removed source file
happens as part of a build (one that probably failed because the
makefiles weren't updated yet), the next build after that apparently
does not get the delta containing the removal anymore.

Change-Id: Id15b424f02dd5c513d2124620c0c8699d61874fd
Signed-off-by: Christian Walther <walther@indel.ch>
2021-11-02 12:45:10 +01:00
Christian Walther
3afae27158 Bug 575702: Nondeterministic makefile ordering
Several parts of makefile output were generated by iterating over
HashMaps, which do not have a deterministic iteration order. Use
TreeMaps instead to output in sorted order. This is possible now that
the API function with return type HashMap is no longer public API and
can be changed to return Map instead.

Benchmark files for affected tests are updated to the new ordering.
This would not be strictly necessary: the tests would also succeed
without, since org.eclipse.cdt.managedbuilder.testplugin.
ManagedBuildTestHelper.compareMakefiles() uses a reordering-tolerant
comparison. However, recording the new (now hopefully stable) order
makes future development on makefile generation easier by avoiding
spurious diff output when tests fail due to changes to other parts of
makefiles.

Change-Id: I20f2e51bd5b9e3bcc5da245d781ca5b4a34fc0b2
Signed-off-by: Christian Walther <walther@indel.ch>
2021-11-02 10:47:17 +01:00
Christian Walther
32a6ad1f4d Bug 575702: Nondeterministic makefile ordering (prelude)
This fixes a small and rarely hit in practice regression regarding
nondeterministic ordering in makefile output introduced in 15c29eb (bug
505882).

Multiple values for a build output variable were previously output in
definition order. Now they are generated by iterating over a HashSet,
which does not have a deterministic iteration order. Use a TreeSet for
output in a consistently sorted order instead.

Output variables with multiple values are rare (most tools generate one
output file of a particular type) and this case was not exercised in the
existing unit tests. Modify one such that it does (even if in a somewhat
contrived situation). Of note, ${OUTPUT} cannot be used in the
commandLinePattern for such a tool because it squashes the multiple
values into a single quoted file name - misuse ${FLAGS} instead.

Change-Id: Iaa28525c21d74c87dd4d72a03e334ed0e5576727
Signed-off-by: Christian Walther <walther@indel.ch>
2021-11-02 10:40:32 +01:00
Mat Booth
a957e8121d Bug 575145 - Importing CMake/Meson Projects
Add API to o.e.tools.templates.ui that hooks into the smart import
feature and allows easy implementation of configurators for various
CDT project types.

Project types that have a IGenerator may use this API to offer smart
import functionality by registering their implementation using the
org.eclipse.ui.ide.projectConfigurator extension point.

This change includes project import implementations for Meson and
CMake project types.

For these project types users can use the normal project import
workflow for their existing non-Eclipse CMake projects instead of
using the New Project Wizard. As an additional benefit, users
can now also import more than one project at a time, even nested
projects.

Change also includes SWTBot tests to exercise the feature.

Signed-off-by: Mat Booth <mat.booth@gmail.com>
Change-Id: I96589e86bee561aa200a4a4487549305765d6409
2021-10-31 11:21:35 +00:00
Torbjörn Svensson
126cf32803 [test] Remove projects from workspace even on failures
If these tests fail, they cause a series of metadata corruption that
will render most/all test executed after as unreliable. Usually, there
is about ~150 test cases that fail without reason when one of these
fails.

Contributed by STMicroelectronics

Change-Id: Ic71ace8b6a55c49dd729d40385b245f12dbd6d85
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-10-28 21:20:14 +02:00
Torbjörn Svensson
38d45364cf Bug 505882: Drop internal IManagedBuildGnuToolInfo interface
The interface has no use as it's hardcoded to be an instance of
ManagedBuildGnuToolInfo in the GnuMakefileGenerator anyway.

Contributed by STMicroelectronics

Change-Id: I0e9130ef485d103e7114e0d122015c062253b4bb
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-10-24 13:16:52 -04:00
Torbjörn Svensson
81a85f8ae9 Bug 505882: Remove deprecated functions
Contributed by STMicroelectronics

Change-Id: Ib811a02cc97ee8afd2343b82b1c7e2e76f9ed0e6
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-10-24 13:16:52 -04:00
Torbjörn Svensson
15c29ebf2c Bug 505882: Generate clean target per subdir.mk
To avoid errors like "Command line too long" when removing build
artifacts, split the clean command on multiple lines. In order to
properly handle whitespace etc, generate a new clean target in each
subdir.mk with the explicit list of files to remove in that directory.
The command should be splited on a sane length, 6000 is used in the
internal builder, so reuse that limit here.

Contributed by STMicroelectronics

Change-Id: I843e1ac896076d279173c421210b72f4a325296f
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-10-20 13:56:36 -04:00
Torbjörn Svensson
c831994958 Bug 505882: Fork the GnuMakefileGenerator into non-API
One more place where the GnuMakefileGenerator is instanciated that
should have been changed in previous commit.

Contributed by STMicroelectronics

Change-Id: Ib89d5e77cbdd2148723b9b1a80cafb72d35390a4
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-10-20 13:53:17 -04:00
Jonah Graham
8d173637f7 Bug 505882: Fork the GnuMakefileGenerator into non-API
The GnuMakefileGenerator is a huge file that needs lots of fixes.
However most of the time to implement the fixes are taken up trying
to not break API. Most extenders of CDT provide their own
implementation of GnuMakefileGenerator by copying the CDT one
and modifying it. Therefore CDT is going to take that same
approach internally and leave the existing GnuMakefileGenerator
in its unmodifiable state.

Change-Id: I12fafb5e347112648a02d4593267bd88a47b5c88
2021-10-18 15:30:08 -04:00
Jonah Graham
ad4d444823 [releng] Prepare for CDT 10.5.0
Change-Id: I9b72edf4a0ff0771a147934dd7f1c92ba1ee799a
2021-09-26 20:23:17 -04:00
Jonah Graham
083b7b1964 Typo.
Change-Id: I4d9ec6da1f02cc41643539c17ba34567ec95ba7b
2021-09-10 10:08:18 -04:00
Jonah Graham
47a94fe3d9 Bug 575903: Call correct clean method
The old clean method was removed from use in Bug 571134 but this call
to it was missed.

Change-Id: I01310a3e3c1f45534e55d146f9480ac323446dd4
2021-09-10 10:08:13 -04:00
Jeff Johnston
9bbf0326a2 Bug 575730 - New Make project should handle cleaning of gcov/gprof files
- add needed changes to Makefile template to clean up .gcda, .gcno,
  and gmon.out files

Change-Id: Icaaac10238da613e5950038a86b6b16768156a2c
2021-08-31 18:08:28 -04:00
Christian Walther
390a8d22b5 Bug 575508: Fix flaky test
Bug_303953Test.testBuildAfterSourcefileDelete() is occasionally seen
failing with an unexpected change to .cproject. I have not investigated
what the change is, but it's plausible that some background process like
the indexer or scanner discovery might asynchronously modify .cproject,
and .cproject is not the focus of this test, so just ignore it along
with .project.

On the hopeful assumption that this was the only flakiness, I am
removing the @Tag(BaseTestCase5.FLAKY_TEST_TAG) annotation.

Change-Id: Ie9191aaf1a66e8475f05eb422d6e4b3949f8138d
Signed-off-by: Christian Walther <walther@indel.ch>
2021-08-19 16:05:00 +02:00
Jonah Graham
0bbd711553 Rename test class to proper name
This file was not being detected by Surefire because it didn't
match the expected file name pattern.

Change-Id: I357fcf7845ad4fdaa2697599d0f400bb128efd20
2021-08-11 12:55:43 -04:00
Marc-Andre Laperle
13914320c6 Bug 574607 - Compilation Database Parser: reload only active config on change
Change-Id: Ide1d1495a1284ed4d3e9b4cc066a62b2cb55e908
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2021-08-09 01:55:08 -04:00
Mat Booth
9f1241f3ef Bug 575139 - Meson shows sanitycheckc.exe in binaries container
Exclude everything in */meson-private/* when generating meson
projects.

Signed-off-by: Mat Booth <mat.booth@gmail.com>
Change-Id: Id26c8dd695e5d09d158bb747b50e04544df706c9
2021-07-30 18:48:09 +01:00
Mat Booth
f61688336b Bug 562002 - Remove dependency to com.ibm.icu from CDT Make Core
Switch to JRE implementations:
 * com.ibm.icu.text.MessageFormat -> java.text.MessageFormat
 * com.ibm.icu.text.DateFormat -> java.text.DateFormat
 * com.ibm.icu.text.SimpleDateFormat -> java.text.SimpleDateFormat

Signed-off-by: Mat Booth <mat.booth@gmail.com>
Change-Id: Idbd5141bd131d412990ea51de681ab1a2d80262e
2021-07-27 15:35:24 +01:00
Christian Walther
ce521345e0 Bug 574741: Always add main-build to .PHONY.
Addendum to 0436516 (Bug 573502): The main-build target now always
exists, not just when there is a pre-build step, so it must always be
marked as .PHONY.

Change-Id: I478222bcc319c516a6e116f710d8382346b5ded5
Signed-off-by: Christian Walther <walther@indel.ch>
2021-07-08 16:11:59 +02:00
Jonah Graham
3f472a917b Bug 574448: Fix spelling of GCC -fsanitize command line options
Change-Id: I9d02cc9937dc88ca3b180bb194edd80a6c904899
2021-06-24 14:29:29 -04:00
Jonah Graham
90b3ebc1df Bug 574331: Set default query results for tests
Most of the tests in this bundle already had this bit of code
before calling create project. This makes BuildDescriptionModelTests
consistent with the rest.

Note that this modifies global state and does not restore it. However,
as that is consistent with the other tests in this bundle, and the
global state is only maintained while running tests on this bundle,
I am not fixing this aspect of the code.

Change-Id: I2004af177a959e1efbd45b23c960b517d8993b7c
2021-06-19 15:33:04 -04:00
Jonah Graham
d907da99a4 Bug 573677: Use array based exec commands to avoid problems with spaces
While most of these commands don't actually have spaces in them, or
their arguments, avoid the deprecated methods.

Change-Id: If7b4324695699d5a6d9a2f8a979657977486d8a4
2021-06-14 22:20:28 -04:00
Julien Dehaudt
a6e6be0457 Bug 526421: Search the icon path from provided contribution
Signed-off-by: Julien Dehaudt <julien.dehaudt@st.com>
Change-Id: I7592a5df9b297f54184f754c7e3b0f8d79a6677c
2021-06-14 16:01:06 -04:00
Jonah Graham
902ea0dfa1 [releng] Bump to CDT version 10.4.0
Change-Id: I0807f46d9ebb8bb579b687366cdb19e40935a9ec
2021-06-12 20:52:54 -04:00
Jonah Graham
4e07f56f0d [releng] Update to newer help-docs-eclipserun-repo
Change-Id: I46118a378e4edf319292a91483df27221c910839
2021-06-12 20:13:23 -04:00
Torbjörn Svensson
224b14318b Use the launch name in the help text
The "eclipse.launcher" property is available when using the eclipse
launcher. If the headless builder app is launched without the eclipse
launcher, fall back to generic "PROGRAM".

The property is not available when running eclipse in runtime mode!

Contributed by STMicroelectronics

Change-Id: If2c99a234fd841451af05e3635d44fe2967c9537
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-05-28 19:23:00 +02:00
Torbjörn SVENSSON
fcbf0b6963 Bug 573722: Allow sub-class to output custom lines in header
Contributed by STMicroelectronics

Change-Id: If7163f33c804dc40bc950da067d81396a26d8f74
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
2021-05-24 09:52:20 -04:00
Jonah Graham
fe2dfb7dd2 Bug 573619: Preserve UI settings in Build Targets (Make) view
This includes saving:
- selection in tree
- expansion in tree
- scroll position

Change-Id: I835d8fabab4f56b01fb0858e92ae63f9e82c9c85
2021-05-19 10:03:25 -04:00
Jonah Graham
c8c65758d5 Bug 338776: Add working set support to Build Targets (Make) view
Change-Id: I3accec157248c474c87d22699c151e4a64ae6f5b
2021-05-19 10:03:25 -04:00
Jonah Graham
76bb80f06d Bug 573512: Add verbose option for progress monitor
During operations, such as remove projects, the subtask of a progress
monitor has useful information for users. However during a normal build
there ends up being lots of output that is of little value.

Change-Id: Ie5bf95a743e8909242a0224883fd22e49ff55ed6
2021-05-15 17:57:13 -04:00
Marc Siebenhaar
8b385ffc1f Bug 573512: Added parameter for removing projects from workspace.
This is command line option to -remove and -removeAll projects from
the workspace.

Change-Id: Ice4e7db3485d2a0c698f48dc2aa0662170289f36
2021-05-15 17:57:13 -04:00
Torbjörn Svensson
043651694a Bug 573502: Ensure post-build step is executed last
The post-build step may depend on secondary artifacts of the build and
should thus be executed last.

Contributed by STMicroelectronics

Change-Id: Iaf67f6b3e1fcab008798d2712e15d0a6a46ceae8
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-05-14 18:35:54 -04:00
Torbjörn Svensson
39a5179311 Bug 571134 - Use the builder argument for clean
This allows to clean the correct configuration

Contributed by STMicroelectronics

Change-Id: Ia47f3694809579f8d6fa6d6e6b0dd46f553d256d
Also-by: Torbjörn Svensson <torbjorn.svensson@st.com>
Also-by: Jonah Graham <jonah@kichwacoders.com>
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2021-05-12 12:44:47 -04:00
Torbjörn SVENSSON
0333e17cfc Bug 573254: Add the missing ITool parameter to toManagedCommandLineInfo
Contributed by STMicroelectronics

Change-Id: I4e9351a8af473bf34f2bc8541461f2b82ffd6262
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-05-01 08:28:09 -04:00
Torbjörn Svensson
3c58527d53 Bug 350499: Ask user to confirm toolchain change
When a user switches toolchain integration used, all the settings will
be lost. Rather than having the user find this out the hard way, prompt
about it and highlight the implications of changing toolchain.

Contributed by STMicroelectronics

Change-Id: I885bc5544d7222eb1aeee7c92ac98c0d1c083cb1
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-04-25 11:26:29 -04:00
Jonah Graham
b6b66b5457 Bug 568397: Add separate text boxes for separate build command and args
Change-Id: I078a1db23a69dcbde503b1dd5e496705ecccc956
2021-04-12 17:25:15 -04:00
Jonah Graham
bbe89c853e [releng] Update to newer help-docs-eclipserun-repo
Note that:
- doc/org.eclipse.cdt.doc.isv
- doc/org.eclipse.cdt.doc.user

were updated in commit 149aca51f9 made
this release cycle.

Change-Id: I5b19c7ba14d1c3f837163c109603f9a330e9f138
2021-04-12 09:28:45 -04:00
Jonah Graham
2073d47084 Bug 572648: Handle cases of empty (EOF) JSON files
Change-Id: I10fae3542ae75120dad0a59b52aaf7b34a67d8e9
2021-04-08 10:56:14 -04:00
Jonah Graham
55c2df3b03 Bug 571309: Use java Collections instead of System.arraycopy
System.arraycopy is more error prone and subsequent commits will
be modifying the array. This commit is to keep unrelated code
separate.

Change-Id: I2490318176da3e631a63974ffe5fa62da44a96ea
2021-04-06 20:23:56 -04:00
Jonah Graham
a028e22442 Bug 572593: reenable disabled meson tests
Upgrade the tests to JUnit5 so they can be marked as flaky and slow.
Also removed a bunch of unused code.

This partially reverts commit 8220215a2e.

Reason for revert: These tests were "temporarily" disabled a while ago
as part of the JIRO migration in Bug 545624.

Change-Id: I111cf4d9d9f5e07e49074ca2355a3d1f52fb1070
2021-04-06 20:21:44 -04:00