Skip to content

Commit df089ec

Browse files
committed
Add comprehensive copilot-instructions.md for Eclipse PDE repository
1 parent 46ec758 commit df089ec

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

.github/copilot-instructions.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Eclipse PDE - Copilot Coding Agent Instructions
2+
3+
## Repository Overview
4+
5+
**Eclipse PDE** provides Eclipse tooling for developing OSGi bundles and RCP applications. ~150MB, 384 bundles, 8 modules.
6+
7+
**Stack:** Maven 3.3.1+ with Tycho 4.0.13, Java 17+ (CI: JDK 21), OSGi/Eclipse RCP, Tycho Surefire tests.
8+
9+
**Critical:** Requires `eclipse-platform-parent` POM from Eclipse Platform aggregator. Standalone `mvn clean verify` will fail with parent resolution errors - this is expected.
10+
11+
## Build & Test
12+
13+
**Prerequisites:** Maven 3.3.1+, JDK 17+ (CI: JDK 21), display server for UI tests (xvnc/Xvfb)
14+
15+
**CI Build (from Jenkinsfile):**
16+
```bash
17+
mvn clean verify -Dmaven.repo.local=$WORKSPACE/.m2/repository \
18+
--fail-at-end --batch-mode --no-transfer-progress \
19+
-Pbree-libs -Papi-check -Pjavadoc -Ptck \
20+
-Dmaven.test.failure.ignore=true \
21+
-Dcompare-version-with-baselines.skip=false
22+
```
23+
24+
**Profiles:** `-Pbree-libs` (BREE check), `-Papi-check` (API baseline), `-Pjavadoc` (docs), `-Ptck` (TCK tests)
25+
26+
**Maven Config (`.mvn/`):** Tycho 4.0.13 extension, `-Pbuild-individual-bundles`, `-DtrimStackTrace=false`
27+
28+
**Tests:** ~1,045 test files. Results: `**/target/surefire-reports/*.xml`. UI tests need display server.
29+
30+
**Artifacts:** `repository/target/repository/` (P2 site), `**/target/compilelogs/` (compile), `**/target/apianalysis/*.xml` (API)
31+
32+
**Timeout:** CI build limit is 60 minutes.
33+
34+
## Project Structure
35+
36+
**8 Top-Level Modules (pom.xml):**
37+
- `apitools/` - API analysis, baseline checking (4 bundles including tests)
38+
- `ui/` - Main PDE UI (26 bundles: core, editors, launching, tests, spy tools)
39+
- `build/` - PDE Build (legacy, maintenance mode - use Tycho instead)
40+
- `ds/` - Declarative Services tooling
41+
- `e4tools/` - Eclipse 4 tools
42+
- `ua/` - User Assistance
43+
- `features/` - 6 feature definitions
44+
- `org.eclipse.pde.doc.user/` - Documentation
45+
- `repository/` - P2 repository (not in default build)
46+
47+
**Root Files:** `pom.xml` (parent: eclipse-platform-parent:4.38.0-SNAPSHOT), `Jenkinsfile`, `.mvn/` config, `prepareNextDevCycle.sh`
48+
49+
**Bundle Structure:** `META-INF/MANIFEST.MF`, `build.properties`, `plugin.xml`, `src/`, `.project`, `pom.xml`
50+
51+
## CI/CD & Quality Gates
52+
53+
**GitHub Workflows (.github/workflows/):**
54+
- `ci.yml` - Main build (triggers: push/PR to master): license check + `mvn clean verify -Ptck`
55+
- `pr-checks.yml` - PR validations: freeze period, no merge commits, version increments (bot: "Eclipse PDE Bot")
56+
- `unit-tests.yml` - Publishes test results
57+
- `version-increments.yml` - Publishes version check results
58+
- `checkDependencies.yml` - Daily dependency range validation
59+
- `codeql.yml`, `htmlvalidator.yml`, `licensecheck.yml`, `doCleanCode.yml` - Additional checks
60+
61+
**Quality Gates (Jenkinsfile):** Compiler warnings (`**/target/compilelogs/*.xml`), API issues (`**/target/apianalysis/*.xml`), Maven console, Javadoc errors. Threshold: 1 NEW issue → unstable.
62+
63+
**Pre-commit Validation:** Run `mvn clean verify -Ptck`, check version increments, review `**/target/compilelogs/` and `**/target/apianalysis/`
64+
65+
## Common Issues & Solutions
66+
67+
**Parent POM not found:** Expected - requires eclipse-platform-parent from Eclipse Platform aggregator.
68+
69+
**API baseline violations:** Update bundle version per Eclipse API rules. See `docs/API_Tools.md`.
70+
71+
**Test failures (headless):** Use `xvfb-run mvn clean verify` or set DISPLAY.
72+
73+
**Build timeout >60 min:** Review added tests/code for performance impact.
74+
75+
## API Tools & Versioning
76+
77+
**API Baseline:** Verifies binary compatibility. Critical for CI.
78+
79+
**Javadoc Tags:** `@noimplement`, `@noextend`, `@noreference`, `@noinstantiate`, `@nooverride`, `@category`
80+
81+
**Version Rules:** Service (compatible fixes), Minor (API additions), Major (breaking changes). Missing `@since` = error.
82+
83+
**Docs:** `docs/API_Tools.md` for comprehensive API Tools documentation.
84+
85+
## Key Notes
86+
87+
**Tycho:** Eclipse-specific Maven extension managing OSGi dependencies, P2 repos, Eclipse metadata (MANIFEST.MF, plugin.xml, feature.xml).
88+
89+
**PDE Build (`build/`):** Maintenance mode. Use Tycho for new projects. Only IDE export bugs fixed.
90+
91+
**Development:** Use Oomph for IDE setup: `https://raw.githubusercontent.com/eclipse-pde/eclipse.pde/master/releng/org.eclipse.pde.setup/PDEConfiguration.setup`
92+
93+
**Trust These Instructions:** Only search if incomplete, encountering undocumented errors, or instructions appear outdated. Consult: `Jenkinsfile` (CI config), `README.md`, `docs/` (API Tools, FAQ, User Guide), `.github/workflows/` (pipelines).

0 commit comments

Comments
 (0)