Commit 931ef78
fix: compute longest common prefix for sibling packages in empty source roots
When a Bazel package contains source files from sibling Java packages
(e.g. dto/ and merge/) without files in the root package,
findCommonParentPackagePrefix returned null because it only checked
if a detected package was a prefix of all others. This caused
"an empty package fragment root must map to one Java package" errors.
Now falls back to computing the actual longest common prefix path,
allowing targets like messier_merger_lib with sources spanning
sibling sub-packages to be provisioned correctly.
Also adds support for merging multiple targets sharing an empty source
root into a single Eclipse project, and collects dependencies from
unprovisioned sibling targets for complete classpath computation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 9921802 commit 931ef78
2 files changed
Lines changed: 232 additions & 53 deletions
File tree
- bundles/com.salesforce.bazel.eclipse.core/src/com/salesforce/bazel/eclipse/core/model/discovery
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1262 | 1262 | | |
1263 | 1263 | | |
1264 | 1264 | | |
1265 | | - | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
1266 | 1287 | | |
1267 | 1288 | | |
1268 | 1289 | | |
| |||
0 commit comments