diff --git a/BUILDING.md b/BUILDING.md new file mode 100644 index 00000000000..312f9916b03 --- /dev/null +++ b/BUILDING.md @@ -0,0 +1,168 @@ +# Eclipse CDT Command Line Build Instructions + +This document covers how to build Eclipse CDT from the command line (e.g. like you may do on Jenkins). + +## Contributing to and Editing Eclipse CDT + +Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for contributing information, including setting up a development environment. + +## Command-line Build instructions with Maven + +Eclipse CDT uses the standard Maven and Tycho workflow for building CDT using Maven 3.8 and Java 17. Therefore to package CDT do: + +``` +mvn package +``` + +and the resulting p2 repository will be in `releng/org.eclipse.cdt.repo/target/repository` + +The current set of options to Maven used for building on the CI can be seen in the Jenkinsfiles on [cdt-infra](https://github.com/eclipse-cdt/cdt-infra/tree/master/jenkins/pipelines/cdt) + +To build CDT plug-ins you need a standard Maven & Java developement environment. The Dockerfiles used for CDT's images are published in [cdt-infra](https://github.com/eclipse-cdt/cdt-infra/tree/master/docker). The requirements for running all tests successfully and for rebuilding non-Java parts of CDT are much more extensive than standard Maven & Java and include items such as GCC, GDB, yarn, Node, etc. Refer to the Dockerfiles for the current versions of those dependencies. + +### Profiles + +There are a number of profiles (-P to mvn) to control the behaviour of the build. + +#### cdtRepo, simrelRepo, defaultCdtTarget + +Individual p2 repos can be turned on and off to allow building CDT, or parts of CDT against different target platforms easily. For example, you can: +- test CDT against a pre-built CDT by using the cdtRepo profile. +- build the standalone rcp debugger against the latest simrel `mvn verify -DuseSimrelRepo -f debug/org.eclipse.cdt.debug.application.product` + +#### build-standalone-debugger-rcp + +Using the `build-standalone-debugger-rcp` profile will include the standalone debugger, located +in `debug/org.eclipse.cdt.debug.application.product` + +#### skip-all-tests, skip-tests-except-cdt-ui, skip-tests-except-dsf-gdb, skip-tests-except-lsp, skip-tests-except-cdt-other + +Using any of the above profiles can skip large sets of tests. The CI build uses this to parallelize tests. See https://ci.eclipse.org/cdt/view/Gerrit/ + +#### terminal-only + +The terminal directory has a special profile that enables only the terminal and its dependencies when used. The allows +running maven like this `mvn -f terminal/pom.xml verify -P only-terminal` to build and test only the terminal +and its dependencies. A special terminal only p2 site is created in `terminal/repo/target/repository`. The CI build +uses this to speedup turnaround on changes only affecting the terminal. See https://ci.eclipse.org/cdt/view/Gerrit/ + +#### baseline-compare-and-replace + +`baseline-compare-and-replace` profile controls whether baseline replace and compare +is performed. On a local build you want to avoid baseline replace and compare, +especially if you have different versions of Java than the baseline was built with. + +If you have the same version of Java as the build machine you can run baseline comparison and +replace. To do that run with the `baseline-compare-and-replace` profile. + +Requires verify phase of maven to run, i.e. will not run with `mvn package` even if profile is specified. + +#### production + +Runs the production steps of the build. This profile can only be run on the CDT CI machines +as access to Eclipse key signing server is needed to sign the jars. + +#### regenHelp + +Some of the help systems in Eclipse CDT require the `regenHelp` profile to rebuild their HTML from the source documents. For example, to regenerate the help +for Autotools or Meson do: + +``` +mvn generate-resources -DuseSimrelRepo -f build/org.eclipse.cdt.meson.docs -PregenHelp +``` + +``` +mvn generate-resources -DuseSimrelRepo -f build/org.eclipse.cdt.autotools.docs -PregenHelp +``` + +#### jniheaders + +The `jniheaders` profile can be used on the `core/org.eclipse.cdt.core.native` and +`native/org.eclipse.cdt.native.serial` to rebuild the header files for JNI natives. +See also `native` property below. + +### Properties + +There are a number of properties (-D to mvn) to control the behaviour of the build. Refer to the +pom.xml for the full list. Many of the properties are not intended to be set at the command +line. + +#### skipDoc + +Documentation generation for CDT can be time consuming. For local builds this can be skipped +with `-DskipDoc=true` + +#### skipTests + +Running tests for CDT can be time consuming. For local builds this can be skipped +with `-DskipTests=true`. + +#### excludedGroups to skip slow or flaky tests + +Some tests in CDT are fairly slow to run and rarely are exercising actively changing code. Some tests in CDT are fairly flaky to run and rarely are exercising actively changing code. These tests are excluded from the main CDT builds (both master/branch and gerrit verify jobs) and are instead run in a special job. Therefore the Jenkinsfiles for master/branch and gerrit use excludedGroups by default. + +To skip slow tests use `-DexcludedGroups=slowTest` +To skip flaky tests use `-DexcludedGroups=flakyTest` +To skip both use `-DexcludedGroups=flakyTest,slowTest` + +See section below on marking tests for how to annotate a test properly. + +#### jgit.dirtyWorkingTree-cdtDefault + +Running a build with uncommitted changes will normally cause an error. To run a build with +uncommited changes use `-Djgit.dirtyWorkingTree-cdtDefault=warning` + +#### dsf.gdb.tests.gdbPath + +For running CDT's DSF-GDB tests, this specifies the path to the location of gdb. + +#### cdt.tests.dsf.gdb.versions + +For running CDT's DSF-GDB tests, this specifies the executable names of the gdbs to run, comma-separated. + +There are a few special values that can be specified (see BaseParametrizedTestCase for source): + +- all: run all versions listed in ITestConstants.ALL_KNOWN_VERSIONS +- supported: run all versions listed in ITestConstants.ALL_SUPPORTED_VERSIONS +- unsupported: run all versions listed in ITestConstants.ALL_UNSUPPORTED_VERSIONS + +The default, defined in the root pom.xml, should be the most recent released version of gdb. + +To build all gdb versions for testing CDT see [download-build-gdb.sh](https://github.com/eclipse-cdt/cdt-infra/blob/master/docker/scripts/download-build-gdb.sh) + +#### native + +The `native` property can be used to build the native libraries. Defining the `native` property will activate profiles to add the extra steps to compile the natives libraries used by CDT. The main CDT build by default will not build the libraries, but instead use the versions of the libraries checked into git. Therefore when users modify the sources of the native libraries, they have to build and commit the changed library binaries as part of the commit. + +The `releng/scripts/check_code_cleanliness.sh`, which is run on the build machine as part of the gerrit and main build flows, will ensure that the libraries that are checked in are indeed up to date with their sources. + +The `native` property can be one of the following: + +- `linux.x86_64` - uses local tools and builds only linux.x86_64 libraries +- `linux.ppc64le` - uses local tools and builds only linux.ppc64le libraries +- `docker` - uses CDT's docker releng images to do the native builds for all platforms +- `all` - uses local tools to do the native builds for all platforms + +Therefore to build all the natives using docker add `-Dnative=docker` to your maven command line (e.g. `mvn verify -Dnative=docker`). + +To build only the native libraries `mvn process-resources` can be used on the individual bundles with the simrel target platform, e.g.: + +- Serial library: `mvn process-resources -Dnative=docker -DuseSimrelRepo -f native/org.eclipse.cdt.native.serial` +- Core library: `mvn process-resources -Dnative=docker -DuseSimrelRepo -f core/org.eclipse.cdt.core.native` + +However, the challenge is that dll files on Windows have a timestamp in them. To have reproducible builds, we need to have a reproducible timestamp. As [Microsoft](https://devblogs.microsoft.com/oldnewthing/20180103-00/?p=97705) has moved away from using a timestamp to rather use a hash of the source files as the value, we therefore hash the source files used by the library and the header files for the Java API and use that as the value. + +An additional tip is to set the following in `.gitconfig` to allow you to diff `.dll` files. This will show the timestamp of the DLL in the diff as part of the DLL headers. + +``` +[diff "dll"] + textconv = objdump -x + binary = true +``` + +When the host is Windows, getting docker to behave as encoded in the pom.xml may be challenging, instead a command like this will probably work (replace your path to git root). Note that running this in git bash causes problems because of the /work in the command line arguments. (TODO integrate this command line way of running into the pom.xml so the original instructions work.) + +`docker 'run' '--rm' '-t' '-v' 'D:\cdt\git\org.eclipse.cdt:/work' '-w' '/work/core/org.eclipse.cdt.core.native' 'quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest' 'make' '-C' 'native_src' 'rebuild'` + +See also `jniheaders` profile above. + diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..14db7e6fa8f --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Community Code of Conduct + +**Version 1.2 +August 19, 2020** + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as community members, contributors, committers, and project leaders pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +With the support of the Eclipse Foundation staff (the “Staff”), project committers and leaders are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project committers and leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the Eclipse Foundation project or its community in public spaces. Examples of representing a project or community include posting via an official social media account, or acting as a project representative at an online or offline event. Representation of a project may be further defined and clarified by project committers, leaders, or the EMO. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Staff at codeofconduct@eclipse.org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The Staff is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project committers or leaders who do not follow the Code of Conduct in good faith may face temporary or permanent repercussions as determined by the Staff. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org) , version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct/) \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cb247fddaa8..4a48ff4d239 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,71 +2,127 @@ Thanks for your interest in this project. -## Project description - -The Eclipse CDT Project provides a fully functional C and C++ Integrated -Development Environment based on the Eclipse platform. Features include: support -for project creation and managed build for various toolchains, standard make -build, source navigation, various source knowledge tools, such as type -hierarchy, call graph, include browser, macro definition browser, code editor -with syntax highlighting, folding and hyperlink navigation, source code -refactoring and code generation, visual debugging tools, including memory, -registers, and disassembly viewers. - -* https://projects.eclipse.org/projects/tools.cdt - ## Developer resources -### Building CDT +For any questions regarding developing, extending and contributing to Eclipse CDT you cannot find answers to here, please [Contact us](#contact). Please also help improving this page, once you got your answer. -The recommended flow for most users is to follow instructions on [getting started with CDT development](https://wiki.eclipse.org/Getting_started_with_CDT_development). +## Contributing to CDT -For information on building CDT from the command line using maven, refer to the [README](README.md)'s Command-line Build instructions with Maven section. +### Setup CDT for development with Oomph + +The recommended flow for most users is to use the "Oomph" installer. With a few clicks you can get a fully working development environment. + +Use the Eclipse installer (Oomph) to setup the Eclipse installation and everything required to get started with CDT development. It downloads Eclipse, sets the API baseline, clones the CDT git repo and imports the projects for you. + +1. Download and run the Eclipse installer, available at https://www.eclipse.org/downloads/packages/installer. +2. In the first page (product selection), click the preference button in the top-right corner and select the Advanced Mode button. + - If you are behind a proxy, at this point you might want to double check your network settings by clicking in the "Network Proxy Settings" at the bottom. +3. Select Eclipse IDE for Eclipse Committers and select Latest as the product version. Click next. +4. Under Eclipse Projects, select CDT. It should now be visible in the bottom list. Click next. +5. Enter installation folder name, workspace name, etc. Click Next, Finish. +6. The installer will download Eclipse, clone the git repository and import the sets of projects you selected. + +**TODO** Put in animated gif of install + +### Setup CDT for development, manual setup + +Many of the active Eclipse CDT developers manually setup their development environment instead of using Oomph as described above. *Developers new to Eclipse development should follow the Oomph instructions above.* The instructions in this section are brief and assume reader has experience in Eclipse development already. + +1. Use *Eclipse IDE for Eclipse Committers* for development of Eclipse CDT +2. Import the projects from the repository that you are interested in. Other parts of CDT are available through the target platform so you can have only some of the projects imported into your workspace. +3. The target platform to use is `releng/org.eclipse.cdt.target/cdt.target` +4. The API baseline to use is `releng/org.eclipse.cdt.target/cdt-baseline.target` - see [Using API Tooling](POLICY.md#Using-API-Tooling) + +### Launching + +After all the CDT projects have successfully built, you'll probably want to run and/or do source-level debugging of the CDT code. Open the PDE (Plug-in Development Environment) perspective: Window->Perspective->Other->"Plug in Development". There, you'll see a project with the name org.eclipse.cdt.ui, right click the org.eclipse.cdt.ui project, select "Run As"->"eclipse application". You should see a new instance of eclipse - with the latest version of eclipse CDT plugins. + +Alternatively, you can create a Launcher: Go to Run - Debug Configurations... Select "Eclipse Application" and click New. Give the Debug Configuration a Name and the other defaults are OK. This appears to be a more widely used launching technique. + +Until you are familiar with the CDT code base, using a Debug Launcher and experimenting with breakpoints is probably the best way to get a warm fuzzy feeling if you have doubts about modifications you are making. -Additional information is available on: +### Creating Pull Requests -* https://github.com/eclipse-cdt/cdt-infra/wiki -* https://projects.eclipse.org/projects/tools.cdt/developer +To make changes to the CDT, whether it be code, docs, JUnits, etc., you will need to create a Pull Request. Below is the process for creating pull requests. The Eclipse CDT project uses GitHub, therefore the [standard help and advice](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests) on using GitHub Pull Requests are useful for additional details. -The project maintains the following source code repositories +These steps apply to anyone, whether a member of Eclipse CDT or a contributor on the project. -* https://git.eclipse.org/r/plugins/gitiles/cdt/org.eclipse.cdt -* https://git.eclipse.org/r/plugins/gitiles/cdt/org.eclipse.cdt.edc -* http://git.eclipse.org/c/cdt/org.eclipse.cdt.master.git -* https://git.eclipse.org/r/plugins/gitiles/cdt/org.eclipse.launchbar -* https://git.eclipse.org/r/plugins/gitiles/cdt/org.eclipse.tools.templates -* https://github.com/eclipse-cdt/cdt-gdb-adapter -* https://github.com/eclipse-cdt/cdt-gdb-vscode -* https://github.com/eclipse-cdt/cdt-vscode -* https://github.com/eclipse-cdt/cdt-infra +- To fix anything in CDT first you can create or find an existing [https://github.com/eclipse-cdt/cdt/issues issue] report for this particular problem/enhancement. Creating an issue is optional, but highly recommended for larger changes to provide a place to pull all aspects of the improvement together and to discuss acceptable solutions before a Pull Request may be ready. +- Setup your Eclipse Development environment and check out source code, see [Setup CDT for development with Oomph](#Setup-CDT-for-development-with-Oomph) below. +- Fix the source code +- Comment your changes in the code +- For new files you must add copyright header, see [Copyright header policy](POLICY.md#Copyright) +- Follow [CDT Guidelines](POLICY.md) for code formating, java warnings/errors, etc. + - Code with any of the warnings/errors mentioned in the policy, including strings externalization and API errors will not be accepted. +- To minimize the change, do not re-format the source code you edited (except changed lines). Do not fix any warnings in the code you are not changing +- If you want to do formatting or styling (such as modernizing code) - create a separate commit (it is good to fix warnings but it would clutter the patch, you want to solve one problem at a time). + - For changes that are strictly cosmetc, a commit message of `Cosmetics.` is sufficient, any additional information that may help a reviewer is more than welcome. + - This separate commit can be provided as a separate PR or as part of the PR that fixes the bug / introduces the new feature. +- To speed up process of applying your changes you should create one or more junit tests as well and include it in your change +- See [Commit messages matter. Here's how to write them well.](https://cbea.ms/git-commit/) +- Make sure your commit message and/or Pull Request [references the issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) (if there is one), e.g.: +``` + Short Description Fixes #123 +``` +- Make sure GitHub Issue has a clear reproducible scenario, if not add one +- Create a Pull Request for your commit(s). + - Eclipse CDT follows standard [GitHub practice](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) on using Pull Requests. + - Eclipse CDT borrows process when possible from the Eclipse Platform project rather than duplicating it here. See the Eclipse Platform's [recommended workflow](https://github.com/eclipse-platform/.github/blob/main/CONTRIBUTING.md#recommended-workflow) for creating Pull Requests. +- Normally committers are watching new Issues and Pull Requests and somebody would look at your contribution in a few days +- If it has not received attention in a week or so, some nagging can help. Send email to [cdt-dev](#contact) asking committers to look at the contribution. Continue sending e-mails until somebody would give up and look :) -This project uses Bugzilla to track ongoing development and issues. +### Copyright, License and Provenance -* Search for issues: https://bugs.eclipse.org/bugs/buglist.cgi?product=CDT -* Create a new report: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=CDT +One of the fundamental rules that Eclipse follows is the ability to trace back who contributed what code and that the person who contributed it has ownership of the code, or has permission from their employer to contribute the code (since employers tend to own everything you write). To help keep this IP integrity going, please ensure your contributions are "clean". +- If you copy ANY code or images from somewhere else please clearly state it +- If you copy GPL code we cannot take it +- If you copy EPL code, preserve the original copyright and contributors +- If your changes add more than 1,000 lines, the patch has to go through IP review process, unless it can be applied by the committer from the same company as you are (Member committer). Try to fix one bug at a time. + - The 1,000 lines include code, comments and even whitespace. + - You cannot simply split up a change into multiple commits to avoid this review process. + - Sometimes the review process is slow, but generally it is quite fast and has little impact over the full contribution cycle. -Be sure to search for existing bugs before you create another one. Remember that -contributions are always welcome! +If you are unsure, please send email to [cdt-dev](#contact) for clarification, if a committer doesn't know the answer we can liase with the staff at the Eclipse Foundation for clarity. + +### Merge Pull Request + +These are the steps that a committer should undertake for all Pull Requests. + +1. Set the milestone field to the release in which patch would be applied, If it is applied in two branches set milestone to maintenance branch +2. Code inspect and test and the patch +3. If the patch is > 1,000 lines and from a non-committer, it must be submitted for IP review, i.e. CQ in IPZilla. See [IP Log](https://wiki.eclipse.org/Development_Resources/Automatic_IP_Log) +4. Merge the Pull Request. Do so while keeping a clean history for CDT +- Use "Rebase and Merge" when the Pull Request has multiple commits separated in a logical fashion. +- Use "Squash and Merge" when merging the PR, especially one where subsequent commits are simply review fixes. +- Only use "Create a Merge Commit" when there is a natural grouping that will be best expressed by showing two branches plus a merge commit. +- It is not necessary for the commit to have a reference in the commit message to the pull request. This reference can be obtained from GitHub automatically. See this [Q&A](https://github.community/t/get-pull-request-associated-with-a-commit/13674) +5. If there is an associated Issue, close the issue and set the milestone. + +### Building CDT (from the command line) + +For information on building CDT from the command line using maven, refer to the [BUILDING](BUILDING.md) file which contains Command-line Build instructions. ## Eclipse Contributor Agreement -Before your contribution can be accepted by the project team contributors must +In order to be able to contribute to Eclipse Foundation projects you must electronically sign the Eclipse Contributor Agreement (ECA). * http://www.eclipse.org/legal/ECA.php -Commits that are provided by non-committers must have a Signed-off-by field in -the footer indicating that the author is aware of the terms by which the -contribution has been provided to the project. The non-committer must -additionally have an Eclipse Foundation account and must have a signed Eclipse -Contributor Agreement (ECA) on file. +The ECA provides the Eclipse Foundation with a permanent record that you agree +that each of your contributions will comply with the commitments documented in +the Developer Certificate of Origin (DCO). Having an ECA on file associated with +the email address matching the "Author" field of your contribution's Git commits +fulfills the DCO's requirement that you sign-off on your contributions. For more information, please see the Eclipse Committer Handbook: https://www.eclipse.org/projects/handbook/#resources-commit ## Contact -Contact the project developers via the project's "dev" list. +Contact the project developers via the project's "dev" list, raise an issue or start a discussion. Official communications, such as voting, is conducted on the dev list. -* https://dev.eclipse.org/mailman/listinfo/cdt-dev +* Dev list: https://dev.eclipse.org/mailman/listinfo/cdt-dev +* Issues: https://github.com/eclipse-cdt/cdt/issues +* Discussions: https://github.com/eclipse-cdt/cdt/discussions diff --git a/Downloads.md b/Downloads.md new file mode 100644 index 00000000000..2ee338e7e24 --- /dev/null +++ b/Downloads.md @@ -0,0 +1,426 @@ +CDT Downloads +------------- + +All downloads are provided under the terms and conditions of the [Eclipse Foundation Software User Agreement](https://www.eclipse.org/legal/epl/notice.php) unless otherwise specified. + +The CDT can either be installed as part of the Eclipse C/C++ IDE packaged zip file or installed into an existing Eclipse using the "Install New Software..." dialog and entering the p2 repository URLs listed below. + +CDT can be used as a standalone debugger. Please See [Standalone Debugger on Wiki](https://wiki.eclipse.org/CDT/StandaloneDebugger) and download the Eclipse C/C++ IDE from [main downloads site](https://www.eclipse.org/downloads/). + +### CDT 10.7.0 for Eclipse 2022-06 + +Eclipse package: [Eclipse C/C++ IDE for 2022-06](https://www.eclipse.org/downloads/packages/release/2022-06/r/eclipse-ide-cc-developers) and run Check for Updates to get CDT 10.7.0. + +p2 software repository:  + +The git repo have been tagged with the [CDT_10_7_0](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_10_7_0) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-10.7.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.7/cdt-10.7.0/cdt-10.7.0.zip) + +As of CDT 10.2.0 CDT no longer provides a separate standalone debugger download. Please See [Standalone Debugger on Wiki](https://wiki.eclipse.org/CDT/StandaloneDebugger) and download the Eclipse C/C++ IDE from [main downloads site](https://www.eclipse.org/downloads/). + +### CDT 10.6.2 for Eclipse 2022-03 + +Eclipse package: [Eclipse C/C++ IDE for 2022-03](https://www.eclipse.org/downloads/packages/release/2022-03/r/eclipse-ide-cc-developers) and run Check for Updates to get CDT 10.6.2. + +p2 software repository:  + +The git repo have been tagged with the [CDT_10_6_2](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_10_6_2) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-10.6.2.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.6/cdt-10.6.2/cdt-10.6.2.zip) +- [cdt-10.6.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.6/cdt-10.6.1/cdt-10.6.1.zip) +- [cdt-10.6.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.6/cdt-10.6.0/cdt-10.6.0.zip) + +As of CDT 10.2.0 CDT no longer provides a separate standalone debugger download. Please See [Standalone Debugger on Wiki](https://wiki.eclipse.org/CDT/StandaloneDebugger) and download the Eclipse C/C++ IDE from [main downloads site](https://www.eclipse.org/downloads/). + +### CDT 10.5.0 for Eclipse 2021-12 + +Eclipse package: [Eclipse C/C++ IDE for 2021-12](https://www.eclipse.org/downloads/packages/release/2021-12/r/eclipse-ide-cc-developers) and run Check for Updates to get CDT 10.5.0. + +p2 software repository:  + +The git repo have been tagged with the [CDT_10_5_0](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_10_5_0) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-10.5.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.5/cdt-10.5.0/cdt-10.5.0.zip) + +As of CDT 10.2.0 CDT no longer provides a separate standalone debugger download. Please See [Standalone Debugger on Wiki](https://wiki.eclipse.org/CDT/StandaloneDebugger) and download the Eclipse C/C++ IDE from [main downloads site](https://www.eclipse.org/downloads/). + +### CDT 10.4.1 for Eclipse 2021-09 + +Eclipse package: [Eclipse C/C++ IDE for 2021-09](https://www.eclipse.org/downloads/packages/release/2021-09/r/eclipse-ide-cc-developers) and run Check for Updates to get CDT 10.4.1. + +p2 software repository:  + +The git repo have been tagged with the [CDT_10_4_1](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_10_4_1) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-10.4.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.4/cdt-10.4.1/cdt-10.4.1.zip) +- [cdt-10.4.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.4/cdt-10.4.0/cdt-10.4.0.zip) + +As of CDT 10.2.0 CDT no longer provides a separate standalone debugger download. Please See [Standalone Debugger on Wiki](https://wiki.eclipse.org/CDT/StandaloneDebugger) and download the Eclipse C/C++ IDE from [main downloads site](https://www.eclipse.org/downloads/). + +### CDT 10.3.3 for Eclipse 2021-06 + +Eclipse package: [Eclipse C/C++ IDE for 2021-06](https://www.eclipse.org/downloads/packages/release/2021-06/r/eclipse-ide-cc-developers) and run Check for Updates to get CDT 10.3.3. + +p2 software repository:  + +The git repo have been tagged with the [CDT_10_3_3](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_10_3_3) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-10.3.3.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.3/cdt-10.3.3/cdt-10.3.3.zip) +- [cdt-10.3.2.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.3/cdt-10.3.2/cdt-10.3.2.zip) +- [cdt-10.3.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.3/cdt-10.3.1/cdt-10.3.1.zip) +- [cdt-10.3.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.3/cdt-10.3.0/cdt-10.3.0.zip) + +As of CDT 10.2.0 CDT no longer provides a separate standalone debugger download. Please See [Standalone Debugger on Wiki](https://wiki.eclipse.org/CDT/StandaloneDebugger) and download the Eclipse C/C++ IDE from [main downloads site](https://www.eclipse.org/downloads/). + +### CDT 10.2.0 for Eclipse 2021-03 + +Eclipse package: [Eclipse C/C++ IDE for 2021-03](https://www.eclipse.org/downloads/packages/release/2021-03/r/eclipse-ide-cc-developers) . + +p2 software repository:  + +The git repo have been tagged with the [CDT_10_2_0](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_10_2_0) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-10.2.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.2/cdt-10.2.0/cdt-10.2.0.zip) + +As of CDT 10.2.0 CDT no longer provides a separate standalone debugger download. Please See [Standalone Debugger on Wiki](https://wiki.eclipse.org/CDT/StandaloneDebugger) and download the Eclipse C/C++ IDE from [main downloads site](https://www.eclipse.org/downloads/). + +### CDT 10.1.0 for Eclipse 2020-12 + +Eclipse package: [Eclipse C/C++ IDE for 2020-12](https://www.eclipse.org/downloads/packages/release/2020-12/r/eclipse-ide-cc-developers) . + +p2 software repository:  + +The git repo have been tagged with the [CDT_10_1_0](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_10_1_0) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-10.1.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.1/cdt-10.1.0/cdt-10.1.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  + +### CDT 10.0.1 for Eclipse 2020-09 + +Eclipse package: [Eclipse C/C++ IDE for 2020-09](https://www.eclipse.org/downloads/packages/release/2020-09/r/eclipse-ide-cc-developers) and run Check for Updates to get CDT 10.0.1. + +p2 software repository:  + +The git repo have been tagged with the [CDT_10_0_1](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_10_0_1) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-10.0.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.0/cdt-10.0.1/cdt-10.0.1.zip) +- [cdt-10.0.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/10.0/cdt-10.0.0/cdt-10.0.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  (CDT 10.0.1 does not include any changes to the stand-alone debugger and therefore there is no updated release for CDT 10.0.1) + +### CDT 9.11.1 for Eclipse 2020-03 and 2020-06 + +Eclipse package: [Eclipse C/C++ IDE for 2020-06](https://www.eclipse.org/downloads/packages/release/2020-06/r/eclipse-ide-cc-developers). + +p2 software repository:  + +The git repo have been tagged with the [CDT_9_11_1](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_9_11_1) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-9.11.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.11/cdt-9.11.1/cdt-9.11.1.zip) +- [cdt-9.11.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.11/cdt-9.11.0/cdt-9.11.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  + +### CDT 9.10.0 for Eclipse 2019-12 + +Eclipse package: [Eclipse C/C++ IDE for 2019-12](https://www.eclipse.org/downloads/packages/release/2019-12/r/eclipse-ide-cc-developers). + +p2 software repository:  + +The git repo have been tagged with the [CDT_9_10_0](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_9_10_0) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-9.10.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.10/cdt-9.10.0/cdt-9.10.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  + +### CDT 9.9.0 for Eclipse 2019-09 + +Eclipse package: [Eclipse C/C++ IDE for 2019-09](https://www.eclipse.org/downloads/packages/release/2019-09/r/eclipse-ide-cc-developers). + +p2 software repository:  + +The git repo have been tagged with the [CDT_9_9_0](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_9_9_0) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-9.9.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.9/cdt-9.9.0/cdt-9.9.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  + +### CDT 9.8.0 for Eclipse 2019-06 + +Eclipse package: [Eclipse C/C++ IDE for 2019-06](https://www.eclipse.org/downloads/packages/release/2019-06/r/eclipse-ide-cc-developers). + +p2 software repository:  + +The git repo have been tagged with the [CDT_9_8_1](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_9_8_1) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-9.8.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.8/cdt-9.8.1/cdt-9.8.1.zip) +- [cdt-9.8.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.8/cdt-9.8.0/cdt-9.8.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  + +### CDT 9.7.2 for Eclipse 2019-03 + +Eclipse package: [Eclipse C/C++ IDE for 2019-03](https://www.eclipse.org/downloads/packages/release/2019-03/r/eclipse-ide-cc-developers). + +p2 software repository:  + +The git repo have been tagged with the [CDT_9_7_2](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_9_7_2) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-9.7.2.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.7/cdt-9.7.2/cdt-9.7.2.zip) +- [cdt-9.7.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.7/cdt-9.7.1/cdt-9.7.1.zip) +- [cdt-9.7.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.7/cdt-9.7.0/cdt-9.7.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  + +### CDT 9.6.0 for Eclipse 2018-12 + +Eclipse package: [Eclipse C/C++ IDE for 2018-12](https://www.eclipse.org/downloads/packages/release/2018-12/r/eclipse-ide-cc-developers). + +p2 software repository:  + +The git repo have been tagged with the [CDT_9_6_0](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_9_6_0) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-9.6.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.6/cdt-9.6.0/cdt-9.6.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  + +### CDT 9.5.5 for Eclipse Photon and 2018-09 + +Eclipse package: [Eclipse C/C++ IDE for 2018-09](https://www.eclipse.org/downloads/packages/release/2018-09/r/eclipse-ide-cc-developers). + +Eclipse package: [Eclipse C/C++ IDE for Photon](https://www.eclipse.org/downloads/packages/release/photon/r/eclipse-ide-cc-developers). + +p2 software repository:  + +The git repo have been tagged with the [CDT_9_5_5](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_9_5_5) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-9.5.5.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.5/cdt-9.5.5/cdt-9.5.5.zip) +- [cdt-9.5.4.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.5/cdt-9.5.4/cdt-9.5.4.zip) +- [cdt-9.5.3.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.5/cdt-9.5.3/cdt-9.5.3.zip) +- [cdt-9.5.2.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.5/cdt-9.5.2/cdt-9.5.2.zip) +- [cdt-9.5.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.5/cdt-9.5.1/cdt-9.5.1.zip) +- [cdt-9.5.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.5/cdt-9.5.0/cdt-9.5.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  + +### CDT 9.4.3 for Eclipse Oxygen + +Eclipse package: [Eclipse C/C++ IDE for Oxygen.3](https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/oxygen3). + +p2 software repository:  + +The git repo have been tagged with the [CDT_9_4_3](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tag/?h=CDT_9_4_3) tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-9.4.3.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.4/cdt-9.4.3/cdt-9.4.3.zip) +- [cdt-9.4.2.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.4/cdt-9.4.2/cdt-9.4.2.zip) +- [cdt-9.4.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.4/cdt-9.4.1/cdt-9.4.1.zip) +- [cdt-9.4.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.4/cdt-9.4.0/cdt-9.4.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  + +### CDT 9.3.3 for Eclipse Oxygen + +Eclipse package: [Eclipse C/C++ IDE for Oxygen.1](https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/oxygen1). + +p2 software repository:  + +You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-9.3.3.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.3/cdt-9.3.3.zip) +- CDT 9.3.2 was not released. +- [cdt-9.3.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.3/cdt-9.3.1.zip) +- [cdt-9.3.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.3/cdt-9.3.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  + +### CDT 9.2.1 for Eclipse Neon + +Eclipse package: [Eclipse C/C++ IDE for Neon.3](https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/neon3). + +p2 software repository:  + +The git repo have been tagged with the CDT_9_2_1 tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-9.2.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.2/cdt-9.2.1.zip) +- [cdt-9.2.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.2/cdt-9.2.0.zip) +- [cdt-9.1.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.1/cdt-9.1.0.zip) +- [cdt-9.0.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.0/cdt-9.0.1.zip) +- [cdt-9.0.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/9.0/cdt-9.0.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  + +### CDT 8.8.1 for Eclipse Mars + +Eclipse package: [Eclipse C/C++ IDE for Mars.2](https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/mars2). + +p2 software repository:  + +The git repos have been tagged with the CDT_8_8_1 tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-8.8.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/8.8.1/cdt-8.8.1.zip) +- [cdt-8.8.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/8.8/cdt-8.8.0.zip) +- [cdt-8.7.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/8.7/cdt-8.7.0.zip) + +CDT also provides its debugger as a stand-alone RCP application which can be downloaded and installed on its own, from:  + +The RCP stand-alone debugger has its own p2 software repository to be used within the RCP itself to upgrade it:  + +### CDT 8.6.0 for Eclipse Luna + +Eclipse package: [Eclipse C/C++ IDE for Luna SR2](https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/lunasr2). + +p2 software repository:  + +The git repos have been tagged with the CDT_8_6_0 tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-8.6.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/8.6/cdt-8.6.0.zip) +- [cdt-8.5.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/8.5/cdt-8.5.0.zip) +- [cdt-8.4.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/8.4/cdt-8.4.0.zip) + +### CDT 8.3.0 for Eclipse Kepler + +Eclipse package: [Eclipse C/C++ IDE for Kepler SR2](https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/keplersr2). + +p2 software repository:  + +The git repos have been tagged with the CDT_8_3_0 tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-master-8.3.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/kepler/sr2/cdt-master-8.3.0.zip) +- [cdt-master-8.2.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/kepler/sr1/cdt-master-8.2.1.zip) +- [cdt-master-8.2.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/kepler/r/cdt-master-8.2.0.zip) + +### CDT 8.1.2 for Eclipse Juno + +Eclipse package: [Eclipse C/C++ IDE for Juno SR2](https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/junosr2). + +p2 software repository:  + +The git repos have been tagged with the CDT_8_1_2 tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-master-8.1.2.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/juno/sr2/cdt-master-8.1.2.zip) +- [cdt-master-8.1.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/juno/sr1/cdt-master-8.1.1.zip) +- [cdt-master-8.1.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/juno/r/cdt-master-8.1.0.zip) + +### CDT 8.0.2 for Eclipse Indigo + +Eclipse package: [Eclipse C/C++ IDE Indigo SR2](https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers-includes-incubating-components/indigosr2). + +p2 software repository:  + +The git repos have been tagged with the CDT_8_0_2 tag. You can download the source from the [web interface](https://git.eclipse.org/c/cdt/org.eclipse.cdt.git). + +Archived p2 repos: + +- [cdt-master-8.0.2.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/indigo/dist/cdt-master-8.0.2.zip) +- [cdt-master-8.0.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/indigo/dist/cdt-master-8.0.1.zip) +- [cdt-master-8.0.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/indigo/dist/cdt-master-8.0.0.zip) + +### CDT 7.0.2 for Eclipse Helios + +Eclipse package: [Eclipse C/C++ IDE Helios SR2](https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/heliossr2). + +p2 software repository:  + +Archived p2 repos: + +- [cdt-master-7.0.2.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/helios/dist/cdt-master-7.0.2.zip) +- [cdt-master-7.0.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/helios/dist/cdt-master-7.0.1.zip) +- [cdt-master-7.0.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/helios/dist/cdt-master-7.0.0.zip) + +### CDT 6.0.2 for Eclipse Galileo + +Eclipse package: [Eclipse C/C++ IDE Galileo SR2](https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/galileosr2). + +p2 software repository:  + +Archived p2 repos: + +- [cdt-master-6.0.2.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/galileo/dist/cdt-master-6.0.2.zip) +- [cdt-master-6.0.1.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/galileo/dist/cdt-master-6.0.1.zip) +- [cdt-master-6.0.0.zip](https://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/galileo/dist/cdt-master-6.0.0.zip) + +### Development Builds + +Development builds of the Eclipse C/C++ IDE can be found on the [Eclipse Downloads page](https://www.eclipse.org/downloads) by clicking on the Development Builds tab. + +Bleeding edge continuous builds are available from the [cdt-master Jenkins build page](https://ci.eclipse.org/cdt/job/cdt-master) and the p2 software repository:  + +Some older builds are available in the old [CDT Nightly Build page](https://archive.eclipse.org/tools/cdt/builds/). + +### Additional Distributions + +The CDT can be installed as part of many commercial products or from the following open source distributions. + +#### Linux + +Most major Linux distributions include packages for Eclipse and the CDT. Check your package manager for availability. diff --git a/POLICY.md b/POLICY.md new file mode 100644 index 00000000000..288ae044039 --- /dev/null +++ b/POLICY.md @@ -0,0 +1,106 @@ +## Code Formatting + +These are the coding style recommendations that are in place with project setting. They are enforced by the [build process](https://github.com/eclipse-cdt/cdt-infra/tree/master/jenkins/pipelines/cdt/verify#cdt-verify-code-cleanliness) and auto-save actions in Eclipse. + +* Preserve formatting and style of old code when making patches +* Use default "Eclipse" code formatting for Java for new code +* Organize Imports action on save +* It is recommended to use code blocks (curly brackets) for `for`/`while`/`do`/`if` statement bodies, with the exception of simple terminating statements, i.e. `if (a) return;` + +## Internationalization + +Externalize strings (excluding exception arguments, tests and special identifiers) + +## Eclipse Java Errors/Warnings + +All CDT plugins override default compiler error/warning and use project specific errors/warnings. This enforced by the [build process](https://github.com/eclipse-cdt/cdt-infra/tree/master/jenkins/pipelines/cdt/verify#cdt-verify-code-cleanliness). + +All committers and contributors submitting patches should enable [http://wiki.eclipse.org/PDE/API_Tools/User_Guide#API_Tooling_Setup API tooling] by setting target baseline platform. Do not commit code with API errors. + +*Patches with errors listed above including API errors will not be accepted without corrections.* + +### Evolving Warning and Error settings + +The warnings and error settings can and should be evolved as needed. For example, a bundle with no warning may want to ensure no new warnings are introduced and should change the project specific settings to upgrade those warnings to errors as needed. This change may require changes to the to [check_code_cleanliness](releng/scripts/check_code_cleanliness.sh) that ensure warnings/errors are at the correct level. + + +## Copyright + +Use Eclipse copyright header: http://www.eclipse.org/legal/copyrightandlicensenotice.php. Here is an example: + + +```java +/******************************************************************************** + * Copyright (c) {date} {owner}[ and others] + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + ********************************************************************************/ + ``` + +A contributors line can be added for significant changes in the file but this is optional. + +## API + +The Eclipse CDT project follows the same guidelines and policies as the Eclipse Platform project, with exceptions noted below. See [Eclipse API Central](https://wiki.eclipse.org/Eclipse/API_Central) for more details. + + +Note: you can still use internal API if you want to, if java visibility allows you (even if it does not, you can hack it, using reflection). The only problem with this approach is that the internal API can be changed without notice or trace, if this happened, you would have a hard time making your code compile or run with new version of the tool. The best approach in this case is to submit a bug asking to create an API for functionality you are looking for. + +### New default methods in interfaces + +According to [Eclipse API Central](https://wiki.eclipse.org/Eclipse/API_Central) and the PDE API tooling, adding a new method to an interface breaks compatibility. However CDT allows an exception. A new default method is allowed in an interface if there is good reason to believe that the new method name will not conflict with any existing implementations. The reason for this exception is to avoid the common and more complicated use case of adding new subinterfaces with *2 naming scheme. An API filter will be needed in this case to prevent the API tooling error that would require a major version bump. Please send an [email to cdt-dev](CONTRIBUTING.md#Contact) to consult with the community if you are unsure. + +### Deprecating and Deleting API + +The Eclipse CDT project follows the same guidelines and policies as the Eclipse Platform project. See [Deprecation Policy](https://wiki.eclipse.org/Eclipse/API_Central/Deprecation_Policy). The changes to the policy are: + +- Removal of any Eclipse CDT API requires approval from the Eclipse CDT Committers. +- Announcement must be made on [cdt-dev](CONTRIBUTING.md#Contact) mailing list - it can be additionally made to [cross-project-issues-dev](https://accounts.eclipse.org/mailing-list/cross-project-issues-dev) mailing list if there is concern that the impact of such removal would affect other Eclipse projects. +- API Changes should be listed in the [New and Noteworthy](https://wiki.eclipse.org/CDT/User/NewInCDT) wiki page. +- API removals and API breakages, actual or planned, should be added to CDT's git repo at [deprecated_API_removals.html](doc/org.eclipse.cdt.doc.isv/guide/deprecated_API_removals.html) and published (starting with CDT 10.0 in Sept 2020) in [Eclipe Help](https://help.eclipse.org/latest/topic/org.eclipse.cdt.doc.isv/guide/deprecated_API_removals.html). The current version can be previewed [here](https://htmlpreview.github.io/?https://raw.githubusercontent.com/eclipse-cdt/cdt/blob/main/doc/org.eclipse.cdt.doc.isv/guide/deprecated_API_removals.html). + +### Using API Tooling + +All committers and contributors should enable API Tooling when writing patches for CDT. This is done automatically when using Oomph to setup your development environment. + +To set up the API baseline manually, follow these steps: + +1. Select "Window -> Preferences". In the window that opens, select "Plug-in Development -> API Baselines" on the left pane. +2. Click on "Add Baseline..." +3. Choose "A target platform" and click Next. +4. In the next page check the box "cdt-baseline". +5. Click "Refresh" to download the contents of the target. +6. Specify a name for this baseline in the top area, like "cdt-baseline" for example. +7/ Click "Finish", then "OK" in the next dialog. + +Once this is done, a full build will be triggered. After that, any changes that don't follow the API rules will be shown as an error. + +**Note that when a new version of CDT is released or you change branches, you will need to refresh the baseline** +1. Go back to "Window -> Preferences", "Plug-in Development -> API Baselines" +2. Select the cdt baseline and click on Edit... +3. In the next page check the box "cdt-baseline". +4. Click "Refresh" to update the contents of the target. +5. Click "Finish", then "OK" in the next dialog. + +(In the future, refreshing manually might not be required, see [https://bugs.eclipse.org/bugs/show_bug.cgi?id=479055 bug 479055]) + +## Javadoc + +All public API classes and interfaces must have meaningful javadoc header, as well as all public API members. + + +## Direct Pushes, Pull Requests and Reviews + +- The Eclipse CDT branches are protected from direct pushes. All changes must be made via a Pull Request. +- Generally it is good practice for pull requests to be reviewed by non-author before pull requestis merged. One of the priviledges of being a CDT Committer is being able to merge pull requests, therefore a review is not required. +- During Release Candidate weeks, all changes should be reviewed by non-author committer. Normal exception is releng changes. + +## Version Numbering + +See [Eclipse Version Numbering Guildlines](https://wiki.eclipse.org/Version_Numbering) + + diff --git a/README.md b/README.md index c94a7f3fd23..8c1f2caf681 100644 --- a/README.md +++ b/README.md @@ -1,192 +1,53 @@ -# Eclipse CDT +# Eclipse CDT™ C/C++ Development Tools + +[![Jenkins](https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fci.eclipse.org%2Fcdt%2Fjob%2Fcdt-master%2F)](https://ci.eclipse.org/cdt/job/cdt-master/) [![Jenkins tests](https://img.shields.io/jenkins/tests?compact_message&jobUrl=https%3A%2F%2Fci.eclipse.org%2Fcdt%2Fjob%2Fcdt-master%2F)](https://ci.eclipse.org/cdt/job/cdt-master/lastCompletedBuild/testReport/) ![GitHub](https://img.shields.io/github/license/eclipse-cdt/cdt) [![Eclipse Marketplace](https://img.shields.io/eclipse-marketplace/v/eclipse-cc-ide)](https://marketplace.eclipse.org/content/eclipse-cc-ide) [![GitHub contributors](https://img.shields.io/github/contributors-anon/eclipse-cdt/cdt)](https://github.com/eclipse-cdt/cdt/graphs/contributors) + + + +The Eclipse CDT™ Project provides a fully functional C and C++ Integrated Development Environment based on the Eclipse platform. Features include: support for project creation and managed build for various toolchains, standard make build, source navigation, various source knowledge tools, such as type hierarchy, call graph, include browser, macro definition browser, code editor with syntax highlighting, folding and hyperlink navigation, source code refactoring and code generation, visual debugging tools, including memory, registers, and disassembly viewers. + +See also https://projects.eclipse.org/projects/tools.cdt and https://eclipse.org/cdt + + + +## Download + +The recommended way to obtain Eclipse CDT is to download it as part of the complete *Eclipse IDE for C/C++ Developers* or *Eclipse IDE for Embedded C/C++ Developers* or *Eclipse IDE for Scientific Computing* from the main [Eclipse IDE download site](https://eclipseide.org/release/). + +Alternatively Eclipse CDT can be installed into an existing Eclipse installation using this p2 URL: `https://download.eclipse.org/tools/cdt/releases/latest/` ([see how](https://help.eclipse.org/topic/org.eclipse.platform.doc.user/tasks/tasks-127.htm)) + +Downloads links for older versions are available in [Downloads](Downloads.md). + +## Help & Support + +The Eclipse CDT (C/C++ Development Tools) User Guide can be found in the [Eclipse Help - C/C++ Development User Guide](https://help.eclipse.org/latest/topic/org.eclipse.cdt.doc.user/concepts/cdt_o_home.htm). + +The Eclipse forum for [C/C++ IDE (CDT)](https://www.eclipse.org/forums/index.php/f/80/) is for users to ask questions on how to use Eclipse CDT. It is monitored by fellow users in the community for support. Stack Overflow also has an [eclipse-cdt](https://stackoverflow.com/questions/tagged/eclipse-cdt) tag that can be added to questions or searched for prevous similar questions. + +The Eclipse CDT Plug-in Developer Guide can also be found in the [Eclipse Help - CDT Plug-in Developer Guide](https://help.eclipse.org/latest/topic/org.eclipse.cdt.doc.isv/guide/index.html). + +There is an [FAQ](FAQ/README.md) covering many commonly asked questions for both user and developers and a [Contribution Guide](CONTRIBUTING.md) for guidance on editing Eclipse CDT's source and submitting changes. + +## Reporting issues + +Please report issues in the [GitHub issue tracker](https://github.com/eclipse-cdt/cdt/issues). + +## Vendor Supplied Eclipse CDT + +Did you get your version of Eclipse CDT from a vendor (such as a chip maker)? If so, they generally support their customers. In that case issues and support questions should be directed at the vendor in the first instance. + +We encourage all vendors who are extending and redistributing Eclipse CDT to engage with the project and contribute fixes and improvements back to the Eclipse CDT project. ## Contributing -Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for contributing information +[Contributions are always welcome!](./CONTRIBUTING.md) -## Developing CDT +Please bear in mind that this project is almost entirely developed by volunteers. If you do not provide the implementation yourself (or pay someone to do it for you), the bug might never get fixed. If it is a serious bug, other people than you might care enough to provide a fix. -Most developers, developing CDT in the Eclipse IDE, should use [Getting_started_with_CDT_development](https://wiki.eclipse.org/Getting_started_with_CDT_development). +## Code of Conduct -## Command-line Build instructions with Maven +This project follows the [Eclipse Community Code of Conduct](https://www.eclipse.org/org/documents/Community_Code_of_Conduct.php). -Eclipse CDT uses the standard Maven and Tycho workflow for building CDT using Maven 3.6.0 and Java 8. Therefore to package CDT do: - -``` -mvn package -``` - -and the resulting p2 repository will be in `releng/org.eclipse.cdt.repo/target/repository` - -The current set of options to Maven used for building on the CI can be seen in the Jenkinsfiles -on [cdt-infra](https://github.com/eclipse-cdt/cdt-infra/tree/master/jenkins/pipelines/cdt) - -To build CDT plug-ins you need a standard Maven & Java developement environment. The Dockerfiles used for CDT's images are -published in [cdt-infra](https://github.com/eclipse-cdt/cdt-infra/tree/master/docker). The requirements for running all tests -successfully and for rebuilding non-Java parts of CDT are much more extensive than standard Maven & Java and include -items such as GCC, GDB, yarn, Node, etc. Refer to the Dockerfiles for the current versions of those dependencies. - -### Profiles - -There are a number of profiles (-P to mvn) to control the behaviour of the build. - -#### cdtRepo, simrelRepo, defaultCdtTarget - -Individual p2 repos can be turned on and off to allow building CDT, or parts of CDT against -different target platforms easily. -For example, you can: -- test CDT against a pre-built CDT by using the cdtRepo profile. -- build the standalone rcp debugger against the latest simrel `mvn verify -DuseSimrelRepo -f debug/org.eclipse.cdt.debug.application.product` - -#### build-standalone-debugger-rcp - -Using the `build-standalone-debugger-rcp` profile will include the standalone debugger, located -in `debug/org.eclipse.cdt.debug.application.product` - -#### skip-all-tests, skip-tests-except-cdt-ui, skip-tests-except-dsf-gdb, skip-tests-except-lsp, skip-tests-except-cdt-other - -Using any of the above profiles can skip large sets of tests. The CI build uses this to parallelize tests. See https://ci.eclipse.org/cdt/view/Gerrit/ - -#### terminal-only - -The terminal directory has a special profile that enables only the terminal and its dependencies when used. The allows -running maven like this `mvn -f terminal/pom.xml verify -P only-terminal` to build and test only the terminal -and its dependencies. A special terminal only p2 site is created in `terminal/repo/target/repository`. The CI build -uses this to speedup turnaround on changes only affecting the terminal. See https://ci.eclipse.org/cdt/view/Gerrit/ - -#### baseline-compare-and-replace - -`baseline-compare-and-replace` profile controls whether baseline replace and compare -is performed. On a local build you want to avoid baseline replace and compare, -especially if you have different versions of Java than the baseline was built with. - -If you have the same version of Java as the build machine you can run baseline comparison and -replace. To do that run with the `baseline-compare-and-replace` profile. - -Requires verify phase of maven to run, i.e. will not run with `mvn package` even if profile is specified. - -#### production - -Runs the production steps of the build. This profile can only be run on the CDT CI machines -as access to Eclipse key signing server is needed to sign the jars. - -#### regenHelp - -Some of the help systems in Eclipse CDT require the `regenHelp` profile to rebuild their HTML from the source documents. For example, to regenerate the help -for Autotools or Meson do: - -``` -mvn generate-resources -DuseSimrelRepo -f build/org.eclipse.cdt.meson.docs -PregenHelp -``` - -``` -mvn generate-resources -DuseSimrelRepo -f build/org.eclipse.cdt.autotools.docs -PregenHelp -``` - -#### jniheaders - -The `jniheaders` profile can be used on the `core/org.eclipse.cdt.core.native` and -`native/org.eclipse.cdt.native.serial` to rebuild the header files for JNI natives. -See also `native` property below. - -### Properties - -There are a number of properties (-D to mvn) to control the behaviour of the build. Refer to the -pom.xml for the full list. Many of the properties are not intended to be set at the command -line. - -#### skipDoc - -Documentation generation for CDT can be time consuming. For local builds this can be skipped -with `-DskipDoc=true` - -#### skipTests - -Running tests for CDT can be time consuming. For local builds this can be skipped -with `-DskipTests=true`. - -#### excludedGroups to skip slow or flaky tests - -Some tests in CDT are fairly slow to run and rarely are exercising actively changing code. Some tests in CDT are fairly flaky to run and rarely are exercising actively changing code. These tests are excluded from the main CDT builds (both master/branch and gerrit verify jobs) and are instead run in a special job. Therefore the Jenkinsfiles for master/branch and gerrit use excludedGroups by default. - -To skip slow tests use `-DexcludedGroups=slowTest` -To skip flaky tests use `-DexcludedGroups=flakyTest` -To skip both use `-DexcludedGroups=flakyTest,slowTest` - -See section below on marking tests for how to annotate a test properly. - -#### jgit.dirtyWorkingTree-cdtDefault - -Running a build with uncommitted changes will normally cause an error. To run a build with -uncommited changes use `-Djgit.dirtyWorkingTree-cdtDefault=warning` - -#### dsf.gdb.tests.gdbPath - -For running CDT's DSF-GDB tests, this specifies the path to the location of gdb. - -#### cdt.tests.dsf.gdb.versions - -For running CDT's DSF-GDB tests, this specifies the executable names of the gdbs to run, comma-separated. - -There are a few special values that can be specified (see BaseParametrizedTestCase for source): - -- all: run all versions listed in ITestConstants.ALL_KNOWN_VERSIONS -- supported: run all versions listed in ITestConstants.ALL_SUPPORTED_VERSIONS -- unsupported: run all versions listed in ITestConstants.ALL_UNSUPPORTED_VERSIONS - -The default, defined in the root pom.xml, should be the most recent released version of gdb. - -To build all gdb versions for testing CDT see [download-build-gdb.sh](https://github.com/eclipse-cdt/cdt-infra/blob/master/docker/scripts/download-build-gdb.sh) - -#### native - -The `native` property can be used to build the native libraries. Defining the `native` property will activate profiles to add the extra steps to compile the natives libraries used by CDT. The main CDT build by default will not build the libraries, but instead use the versions of the libraries checked into git. Therefore when users modify the sources of the native libraries, they have to build and commit the changed library binaries as part of the commit. - -The `releng/scripts/check_code_cleanliness.sh`, which is run on the build machine as part of the gerrit and main build flows, will ensure that the libraries that are checked in are indeed up to date with their sources. - -The `native` property can be one of the following: - -- `linux.x86_64` - uses local tools and builds only linux.x86_64 libraries -- `linux.ppc64le` - uses local tools and builds only linux.ppc64le libraries -- `docker` - uses CDT's docker releng images to do the native builds for all platforms -- `all` - uses local tools to do the native builds for all platforms - -Therefore to build all the natives using docker add `-Dnative=docker` to your maven command line (e.g. `mvn verify -Dnative=docker`). - -To build only the native libraries `mvn process-resources` can be used on the individual bundles with the simrel target platform, e.g.: - -- Serial library: `mvn process-resources -Dnative=docker -DuseSimrelRepo -f native/org.eclipse.cdt.native.serial` -- Core library: `mvn process-resources -Dnative=docker -DuseSimrelRepo -f core/org.eclipse.cdt.core.native` - -However, the challenge is that dll files on Windows have a timestamp in them. To have reproducible builds, we need to have a reproducible timestamp. As [Microsoft](https://devblogs.microsoft.com/oldnewthing/20180103-00/?p=97705) has moved away from using a timestamp to rather use a hash of the source files as the value, we therefore hash the source files used by the library and the header files for the Java API and use that as the value. - -An additional tip is to set the following in `.gitconfig` to allow you to diff `.dll` files. This will show the timestamp of the DLL in the diff as part of the DLL headers. - -``` -[diff "dll"] - textconv = objdump -x - binary = true -``` - -When the host is Windows, getting docker to behave as encoded in the pom.xml may be challenging, instead a command like this will probably work (replace your path to git root). Note that running this in git bash causes problems because of the /work in the command line arguments. (TODO integrate this command line way of running into the pom.xml so the original instructions work.) - -`docker 'run' '--rm' '-t' '-v' 'D:\cdt\git\org.eclipse.cdt:/work' '-w' '/work/core/org.eclipse.cdt.core.native' 'quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest' 'make' '-C' 'native_src' 'rebuild'` - -See also `jniheaders` profile above. - -### Marking tests as Slow or Flaky - -Tests in CDT can be marked as Slow or Flaky to prevent them running as part of the standard test suites. See excludedGroups to skip slow or flaky tests sections above. - -The proper way to mark a test as slow or flaky is to add a JUnit5 @Tag on the test with `flakyTest` or `slowTest`. The canonical values for these are in the JUnit5 base test `org.eclipse.cdt.core.testplugin.util.BaseTestCase5`. - -These tags can only be applied to JUnit5 (aka Jupiter) tests. If a test needs converting, do that in a separate commit before adding the tags so that the test refactoring can be verified before excluding the test from normal runs. - -### Converting tests to JUnit5 - -To take advantage of new features, such as excluding flaky and slow tests, individual tests need to JUnit5 (aka Jupiter). If a test is currently written in JUnit4 or JUnit3 style it needs to be converted to JUnit5 first. Those tests that currently derive from `org.eclipse.cdt.core.testplugin.util.BaseTestCase` can change to `org.eclipse.cdt.core.testplugin.util.BaseTestCase5` and make further adjustments. Common adjustments are: -- refactoring `setUp`/`tearDown` methods to use `@BeforeEach` and `@AfterEach` annotations -- refactor complicated uses of TestSuites in JUnit3 that were workarounds for the lack of JUnit features like `@BeforeAll` and `@AfterAll`. -- add `@Test` annotation (make sure to use `org.junit.jupiter.api.Test` and not JUnit4's `org.junit.Test`) -- statically import assert methods from `org.junit.jupiter.api.Assertions` (note that in JUnit5 the message is now last instead of first, this generally leads to an error by changing the imports, except in the case of `assertEquals` where the first and third parameter are `String`) +## Migration from Gerrit, Bugzilla, Wiki, Eclipse Forums +In the summer of 2022 the Eclipse CDT project migrated from Gerrit, Bugzilla, Wiki, Eclipse Forums to GitHub based solutions. Please see [GitHub Migration](GitHubMigration.md) for more details. diff --git a/TESTING.md b/TESTING.md new file mode 100644 index 00000000000..632f1036ac0 --- /dev/null +++ b/TESTING.md @@ -0,0 +1,23 @@ +# Eclipse CDT Testing notes + +This document is a collection of various notes on testing and writing JUnit tests in Eclipse CDT. + +## Contributing to and Editing Eclipse CDT + +Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for contributing information, including setting up a development environment. + +### Marking tests as Slow or Flaky + +Tests in CDT can be marked as Slow or Flaky to prevent them running as part of the standard test suites. See excludedGroups to skip slow or flaky tests sections above. + +The proper way to mark a test as slow or flaky is to add a JUnit5 @Tag on the test with `flakyTest` or `slowTest`. The canonical values for these are in the JUnit5 base test `org.eclipse.cdt.core.testplugin.util.BaseTestCase5`. + +These tags can only be applied to JUnit5 (aka Jupiter) tests. If a test needs converting, do that in a separate commit before adding the tags so that the test refactoring can be verified before excluding the test from normal runs. + +### Converting tests to JUnit5 + +To take advantage of new features, such as excluding flaky and slow tests, individual tests need to JUnit5 (aka Jupiter). If a test is currently written in JUnit4 or JUnit3 style it needs to be converted to JUnit5 first. Those tests that currently derive from `org.eclipse.cdt.core.testplugin.util.BaseTestCase` can change to `org.eclipse.cdt.core.testplugin.util.BaseTestCase5` and make further adjustments. Common adjustments are: +- refactoring `setUp`/`tearDown` methods to use `@BeforeEach` and `@AfterEach` annotations +- refactor complicated uses of TestSuites in JUnit3 that were workarounds for the lack of JUnit features like `@BeforeAll` and `@AfterAll`. +- add `@Test` annotation (make sure to use `org.junit.jupiter.api.Test` and not JUnit4's `org.junit.Test`) +- statically import assert methods from `org.junit.jupiter.api.Assertions` (note that in JUnit5 the message is now last instead of first, this generally leads to an error by changing the imports, except in the case of `assertEquals` where the first and third parameter are `String`) diff --git a/logo.png b/logo.png new file mode 100644 index 00000000000..d2c1cabbcdd Binary files /dev/null and b/logo.png differ diff --git a/snapshots.gif b/snapshots.gif new file mode 100644 index 00000000000..137eebe481c Binary files /dev/null and b/snapshots.gif differ