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

3098 commits

Author SHA1 Message Date
Victor Rubezhny
2b67c0bda9 Bug 418579 - String index out of range: -8
Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
Change-Id: I02763d18fdf8f9715670b671a7f84f9fe06489ca
2020-08-25 16:08:45 -04:00
Jonah Graham
0c5093d6ff Bug 566334: Turn on API Tooling & Analysis for all bundles
Change-Id: I3cb5645eba52b0cd0e9a71069264d9c589159107
2020-08-24 17:50:56 -04:00
Jonah Graham
fd9382d8a9 Bug 562494: Update BREE to Java 11
Change-Id: I0c91aafc0cb1b179936acbd4c9df2d961899e3fa
2020-08-24 17:50:56 -04:00
Marc-Andre Laperle
e933f46289 Bug 565553 - Improve performance of build command parsers with large number of files
Compile a pattern ahead of time and early return.

The first pattern is used to trim extra characters that are not
contained within the actual option pattern. If this first pattern
doesn't match, there is no point in continuing because it is a superset.

Times before/after, only counting AbstractOptionParser.parseOption
LLVM before: 4289ms, after: 622ms

Change-Id: Id40fc9a35359c39aea00ba14813ffe6c343158fc
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-08-23 23:21:14 -04:00
Marc-Andre Laperle
68c9b53de0 Bug 566107 - Option parsers can fail to trim extra characters when using patterns with numbered back-references
Clarify in the javadoc that numbered back-references should not be used
in order for option pattern to safely work.  Add a unit test
demonstrating the flaw when numbered back-references are used.  Update
GCC parser as an example for not using numbered back-references.

Change-Id: I008b3589486dc9fb0d9d9aa41f7cc2443bf4351e
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-08-23 21:33:05 -04:00
jantje
2a62d58621 Bug 564123 Treat environment and build variable case sensitively
Remove all equalIgnoreCase and equal with uppercasing for environment
variables

Change-Id: Ic15974b5fb62413c7b1826ced544ff6d4a8eba2f
Signed-off-by: jantje <eclipse@baeyens.it>
2020-08-18 18:11:48 -04:00
Jonah Graham
ef79d15071 Bug 564123 Remove long commented out and dead test code
Change-Id: I0022463409db4de701b3ad18e1309f894d499e2a
2020-08-18 12:26:40 -04:00
Martin Weber
60e32477d0 Remove unused file.
Unused since bug 559674: Integrate new indexer support into CDT build

Change-Id: Ifd4878f944eff6f12e3ab2df399c619abfa47f59
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2020-08-16 16:09:59 -04:00
Martin Weber
9e303185f9 Bug 564002: Restore the default pattern of the surefire-plugin
Sets the pattern to the default of upcoming tycho 2.0 in advance.

Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
Change-Id: I31b3fc733d0cb888fbf6f566995ce2043f6cd621
2020-08-13 14:18:47 -04:00
Jonah Graham
2bd07a89ca Bug 559674: Include only "primary" cmake.is support by default
The vendor specific support files need to be installed separately.
Includes changing the bundles display names to match the CMake main bundle
so that in the install wizard it is clear(er) what they work with.

Change-Id: I12ca155228e906c6c38fe37e37e8ce08d05a2452
2020-08-04 16:23:03 -04:00
Jonah Graham
279fc6a8b2 Bug 559674: Include CMake IS in CMake feature
This is one way to publish the cmake.is plug-ins. It may be that
additional features are desired as this implementation is all of cmake
support or non of it.

Change-Id: Ie945d2ce94b5ac34c6c238ed7bfbdc3ff336e538
2020-08-04 12:51:02 -04:00
Marc-Andre Laperle
4ebaaf7b25 Bug 565457 - CDB settings provider/parser's automatic exclusion of files is very slow
Implement a file exclusion algorithm that favors excluding whole folders when
possible.

The way it works is we gather exclusion information of each folder as we visit
each children. When "leaving" the folder, we can act on whether or not it can
be considered for exclusion as a whole or instead individually exclude a subset
of its children.

Using LLVM code base as a test:
Before: 613 sec
After: 2.4 sec

Change-Id: Ib882a72cae157e3db6b6c94a1a09cb6f05b66bc4
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-08-03 21:46:22 -04:00
Marc-Andre Laperle
9e7b5beaa9 Bug 565553 - Improve performance of build command parsers with large number of files
Cache results of various path resolution algorithms.

Resolving paths is particularly slow while creating entries, see
AbstractLanguageSettingsOutputScanner.createResolvedPathEntry.

There are three main callees within that method that this patch addresses with
a caching approach:

* findContainerForLocationURI: First, this finds containers for a given URI in
the workspace using Eclipse resources API. Then a single container is
selected based on a preferred project. This can done repeatedly for include
paths, which are often similar for source files in a given project or source
folder. This first step is the expensive one and it only depends on one
argument (the URI) and a simple IResource[] return type, so the cache here is
done for this operation. Then the post-filtering is kept as is.

* findFileForLocationURI: Similar to the container case but for files. A
typical projet has much less file paths than folder paths in its options. One
more common option using file paths is -include. The same approach is applied
here as the previous point because there are performance gains but they are
smaller if you consider typical projet setup.

* findBestFitInWorkspace: When a path cannot be found, this makes an attempt to
find the parsed path relative to every folder of the workspace, by starting
first with the preferred project, then its referenced projects and then the
rest. Caching the result of findBestFitInWorkspace itself is too cumbersome
because the result depends on 3 variables (currentProject,
currentCfgDescription and parsedName) which would make a complex cache key.
Instead, caching the result of findPathInFolder at the project level is
sufficient, with little to no performance difference.

In all three cases, the class LRUCache is used in order to limit memory
consumption of the cache. A limit of 100 elements for each cache was chosen
based on experimentation with a few projects like LLVM and projets several
times bigger. A limit higher than necessary for small projects does not incur a
noticeable overhead for small projects and a limit too small for very large
projects merely diminishes the performance gains.

Using LLVM code base as a test, the time to parse options for all files:
Before: 68395ms, after: 5599ms

Change-Id: Ib997e9373087950f9ae6d93bbb1a5f265431c6bc
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-08-03 12:47:18 -04:00
Marc-Andre Laperle
1cb1233c33 Fix CompilationDatabaseParserTest wrongly running the parser twice simultaneously
By design, the parser/provider fires when loading the cproject
description but we also call it by hand in the main code of the tests.
This means CompilationDatabaseParser could be running twice
simultaenously along with the same output parser code that it delegates
to. The problem was exposed fully when adding more complex data
structure (hash maps) to the output parsers in another commit, as it
would produce ConcurrentModificationException.

We need to be careful when we choose to call setProjectDescription
because it triggers the provider and then we have to wait for the jobs
to complete (joinLanguageSettingsJobs). By taking this into
consideration, several tests had to be updated. Most notably, the
read-only config test case had to be merged with the time-stamp update
test case because it was the only sensible way to test before/after
changes of language settings with such config.

Change-Id: Ib3a7caefa95b436ad9b699a2614e966a4a8dfca9
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-08-03 12:45:52 -04:00
Martin Weber
45c979c400 Bug 565586: Handle -include and -imacros compiler flags
Change-Id: Iee67ab08ed2daa9af69fa1de583f3c6f8305960a
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2020-07-31 13:21:28 -04:00
Martin Weber
005b82195b Bug 559674: Integrate new indexer support into CDT build
Change-Id: Ie07e6283f8285e56b7f74f29a8db1cbe222e0304
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2020-07-22 13:06:11 -04:00
Alexander Kurtakov
080b4ba90d Set maven-antrun-plugin to 3.0.0
Don't overwrite it in plugins as version is set in
parent/pluginManagement.

Change-Id: I73d2b4d234ba83eae7ec2cd51f3e53d58256b81e
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-07-22 09:30:30 +03:00
Alexander Kurtakov
d593c7a25f Build with Tycho 1.7.0
Get rid of tycho-extras-version as there is no more tycho-extras.

Change-Id: I9d215aad94c4e8320153f06368d6b3ecfa4a3c42
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-07-22 09:21:27 +03:00
Marc-Andre Laperle
d017917f35 Bug 563006 - CDB settings provider/parser doesn't support "arguments"
One flaw with this implementation is that the "arguments" coming from
the CDB do not have shell quoting and shell escaping of quotes whereas
the current implementations of Build Output parsers assume some form of
shell quoting. This means that simply joining strings of arguments with
spaces will be missing the expected shell quoting and possibly misparsed
by the build output parsers.
It is not clear to be at this point if this should be fixed or not as it
might involve revamping the existing build output parsers to add the
concept of shell/environment and this could also affect potential
extenders.

In this current form, simple cases with no spacing and quote escaping
involved work correctly and is still a nice improvement.

Change-Id: Ia81796e63c748318b34696998ac4a467712e5f96
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-07-11 17:28:56 -04:00
Marc-Andre Laperle
97c1151f01 Bug 564949 - Remove support for CDT 3.X style projects (partial)
Remove some Wizard classes that are not referenced anywhere anymore.
This commit is just a first of probably several commits but is already
a start. I already had very large commits in progress in the past but
it became big and hard to push so I'd rather do it step by step this
time and at least have some of it done for the next release.

Also moved some messages to its own message bundle in managedbuilder.ui
because it's the only place they are used now.

Change-Id: Ib4258684c91f205dc4af3b17169609b5ebcff253
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-07-07 22:26:01 -04:00
Torbjörn Svensson
0391d6ccf1 Fixed NLS and null warnings
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
Change-Id: I6e40038e99c37a4efc25f64d8d186b00c6f55f8c
2020-07-04 04:20:49 -04:00
Sergei Kovalchuk
379004b618 Bug 562003 - Remove dependency to com.ibm.icu from CDT Make UI
The dependency was removed.The Copyright head was updated.

Change-Id: I82e4289fc8cb14e8488b847e8efa415dd1d77b6c
Signed-off-by: Sergei Kovalchuk <serjiokov@gmail.com>
2020-06-17 03:33:25 -04:00
Jonah Graham
12cf801870 Bug 564272: Increment major version of org.eclipse.cdt.core to 7.0.0
Change-Id: I9124dd406c5981435a72ff4aaa7033f1c3d1979b
2020-06-13 16:21:05 -04:00
jantje
f5e029d19c Bug 564123 delete org.eclipse.cdt.utils.Platform
The class overrode org.eclipse.core.runtime.Platform to
workaround bugs in the platform that have since been fixed.
As 32-bit x86 and PPC support has been removed this
class is no longer needed as all the code is now
unreachable anyway.

Change-Id: I01bb00b9203aa02663ff25ce36c4c14f22dadee5
Signed-off-by: jantje <eclipse@baeyens.it>
2020-06-13 13:05:41 -04:00
Torbjörn Svensson
ef2ee6df71 Bug 564257: Respect commandGenerator and applicabilityCalculator
The method Configuration.getUserObjects() and Configuration.getLibs()
should respect the commandGenerator and applicabilityCalculator defined
for the option in the toolchain definition.
The method Tool.getToolCommandFlags() should call the commandGenerator
only if the value type would generate a default command.

Change-Id: I4d6224627888e602682076ac929adbf808cff8d7
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-06-12 20:02:31 +02:00
Sergei Kovalchuk
4bd9fed83b Bug 562004 - Remove dependency to com.ibm.icu from CDT Managed Build
Core

Dependency removed for Managed Build Core

Change-Id: I15e29453a1452a5060c470f3b3658cb5763615b0
Signed-off-by: Sergei Kovalchuk <serjiokov@gmail.com>
2020-06-08 06:12:46 -04:00
Sergei Kovalchuk
afdd68157b Bug 561993 - Remove dependency to com.ibm.icu from CDT UI
Use java.text.MessageFormat instead of com.ibm.icu.text.MessageFormat

Change-Id: Ie7ed91d776b707def1bbfc12c24f5e863638e083
Signed-off-by: Sergei Kovalchuk <serjiokov@gmail.com>
2020-06-04 07:31:47 -04:00
Marc-Andre Laperle
167ce562b2 Bug 559186 - Allow using variables for the CDB path in CDB settings provider
For example, you can use ${ProjDirPath}/buid/compile_commands.json
which is a more sharable setting

Change-Id: Ic51775ea1f7d258c55e2e720c94f626a17444744
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-05-10 14:44:18 -04:00
Jonah Graham
0ab57c346a [releng] Remove and add .prefs files according to improved cleanliness script
Change-Id: I9bc8364cda1a1154750127f5db5549073323e84c
2020-04-26 14:52:45 -04:00
Jonah Graham
eeebe5234c Bug 562452: Avoid using .C for C++ files when calculating specs
Change-Id: I0fe24a8343e73d501ae09e8bf3721e3d310a696d
2020-04-25 16:43:23 -04:00
Jonah Graham
d66d3e8e85 [releng] Bump version to 10.0.0
Change-Id: I32f6f61835bdbad3cffd713965045c5097c8619f
2020-04-11 17:46:58 -04:00
Marco Stornelli
31b748e7b9 Bug 510789 - Added final field to class wizard
Change-Id: Ib2f0168b897e665f3577511144692bb446d5ab84
2020-04-09 06:44:42 -04:00
Alexander Fedorov
ec893a74ec Bug 561539 - Revise API for CDT Build GCC support
Export packages as "x-internal"

Change-Id: I592594aa402a5137c8e95346ab8c9acd858a557c
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-03-30 13:52:08 +03:00
Jonah Graham
1cb1cdaa9a Bug 561406 - Revise API for CDT Autotools
Setup API filters

Change-Id: Ie9f8fc399be84216bb092bd3a6b7612a564768d7
2020-03-29 13:38:45 -04:00
Alexander Fedorov
d9b5d57514 Bug 561406 - Revise API for CDT Autotools
Setup API filters

Change-Id: I1147d697fa7c76b2da50502966ac60d1bcd0c74d
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-03-29 10:54:59 +03:00
Alexander Fedorov
822508a83b Bug 561406 - Revise API for CDT Autotools
Export packages as x-internal" for test bundles

Change-Id: I6961e5f9e805cab13263d3407ac95b8006d8de43
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-03-28 14:38:02 -04:00
Alexander Fedorov
b65be51fc9 Bug 561406 - Revise API for CDT Autotools
Mark packages either "x-internal" or "x-friends"

Change-Id: I63a1ff904ed483de2591004e42b452e6b76c16c2
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-03-25 22:22:10 +03:00
Alexander Fedorov
c664c76dcd Bug 561390 - Revise API for CDT CMake UI
- renamed package "org.eclipse.cdt.cmake.ui.properties"
to "org.eclipse.cdt.cmake.internal.ui.properties"
- exported all packages as "x-internal"

Change-Id: Iedf70fec4d3457b24fdfa288d87af855c560fbf4
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-03-24 08:46:09 +03:00
Marco Stornelli
c2f51a8d23 [releng] Bump CDT version to 9.12.0
org.eclipse.cdt.debug.gdbjtag is bumped because of Bug 561343

Change-Id: I6dac283b7e9093662f57ac5c804021c4201ad6f1
2020-03-22 14:05:17 -04:00
Jonah Graham
ce109e81cc [releng] Update help-docs-eclipserun-repo to use Platform 4.15
Change-Id: I4fcfba2b33ea511d58856ed2c3c6e51322661708
2020-03-22 13:33:47 -04:00
Martin Weber
268903ba01 Bug 561318: Recursively delete files without running out of handles
Change-Id: Ib760f53a22bb75f0447c633341728a49cdf8cbfb
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2020-03-21 19:17:54 -04:00
Jeff Johnston
d1c7eb449a Bug 560738 - Changing single Meson property does not do anything
- fix check in performOk() so a single property can be changed

Change-Id: If3a838b91c89bee9b96f4336a5af004f7594e237
2020-03-03 12:08:03 -05:00
Jonah Graham
3fa2f45e08 Fixup versions on Revert "Bug 560614 - Drop dependency on ICU4J"
Change-Id: I837592950482cc1872fdafb73fc7e9a01292a7ed
2020-03-02 12:47:54 -05:00
Jonah Graham
5a6b9b4bf4 Revert "Bug 560614 - Drop dependency on ICU4J"
This reverts commit 87b627bf02.

Change-Id: I54ea1ac766437deb174eeba571a7a5094c180828
2020-03-02 06:49:24 -05:00
Alexander Kurtakov
87b627bf02 Bug 560614 - Drop dependency on ICU4J
Straightforward conversion. Still usages left that need deeper
investigation how to be done proper.
Some long time commented code removed as java formatter breaks trailing
whitespaces on save.


Change-Id: If74259bed5735b0d4cc98fc2cfa609c9c53c80c9
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-03-02 06:46:15 -05:00
Alexander Fedorov
191cd19825 Bug 559641 - No Meson in CDT due to Meson UI causing OSGi wiring issue
I have no idea why JAX-RS was needed to parse JSON, may be meson has
REST based web-services? Who knows.
I removed com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider that
seems to cause wiring issue - but I'm not sure that it is really gone.
I still can see a UI from json, checked it with modifying field
descriptions in "intro-buildoptions.json"

Change-Id: I2252ae0901e4e408ba6a4752c91ad3a1fbecb096
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-02-04 15:42:32 -05:00
Alexander Kurtakov
f90f900e48 Move away of the deprecated AbstractUIPlugin.getWorkbench
Use PlatformUI.getWorkbench instead.

Change-Id: I8c0eb2c4b3b414e61f03fc9d9becd1d574f7e26d
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-02-04 14:43:53 +02:00
Alexander Kurtakov
2f20829144 Remove unnecessary cast to IToolChain.
Change-Id: I653c4b3f4389c4ad4add33cf223ff7882d8fb0ac
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-02-04 10:55:18 +02:00
Jonah Graham
edf13963f7 Bug 559647: [CDT autotools docs] Update links to be https://
As the pages are served in an https:// frame, modern browsers will
only successfully link content if link is also to https.

This commit includes the regenerated from Wiki output

Change-Id: If4c3bc083ddbb5dc63a9edfb2b3cd9aaf47b54de
2020-01-30 13:44:15 -05:00
Jonah Graham
bcfcc0b7d7 Bug 559647: [CDT meson docs] Update links to be https://
As the pages are served in an https:// frame, modern browsers will
only successfully link content if link is also to https.

This commit includes the regenerated from Wiki output

Change-Id: Ie09f411baa02cda76d33a294c8feaa9d35d0ffbe
2020-01-30 13:44:15 -05:00