Skip to content

Commit 10ebf50

Browse files
Jamesclaude
authored andcommitted
pom_dlineage.xml: drop the private <parent>, and build it in CI so this stops hiding
pom_dlineage.xml declared <parent>gudusoft:gsp_java:1.0-SNAPSHOT</parent>, the private library reactor, which is published nowhere. On any machine that had not installed that POM, Maven stopped before reading the file's own contents: Non-resolvable parent POM for gudusoft:gsp_demo_java_dlineage:1.0-SNAPSHOT: Could not find artifact gudusoft:gsp_java:pom:1.0-SNAPSHOT The root pom.xml was cut loose from that same parent when this repository was made buildable outside Gudu, and carries a comment saying so. This file was missed, and it looked fine to everyone here because we all have the library checked out beside it. Checked what would be lost before removing it: two properties (maven.compiler.source/target 1.8, both already declared here), an empty <dependencies>, and a single maven-antrun-plugin marked <inherited>false</inherited> that deletes .pas files out of the library's parser folder. No dependencyManagement, pluginManagement, distributionManagement or repositories. Nothing needed. Verified against a completely empty local repository, which is the only way to see this: the build succeeds, creates no gudusoft/ group directory at all, and its classpath takes com.gudusoft:gsqlparser:4.1.9 from the public Maven repo, with lib/ contributing only simple-xml, fastjson and expr4j. The packaged jar runs and emits lineage XML. Root cause of it surviving this long: no workflow built this file. Both now do, and they also assert it left the root build's target/classes alone, since sharing ${project.basedir} with a single-source-file build is what made it wipe the root build in issue #39. That is the second breakage found in this one file, both invisible to us and both fatal for a plain clone. Noted in CLAUDE.md that anything CI does not run is load-bearing only by luck. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qPRpoD8exYRrUmbfXXWXj
1 parent 5195794 commit 10ebf50

4 files changed

Lines changed: 103 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,32 @@ jobs:
7575
echo "$out"
7676
grep -q "syntax errors: 0" <<<"$out"
7777
78+
# pom_dlineage.xml is a second, separate build in this same directory, and
79+
# nothing used to run it. It declared a <parent> of gudusoft:gsp_java,
80+
# the private library reactor, so it only built for someone who had that
81+
# POM installed locally; a plain clone got "Non-resolvable parent POM"
82+
# before Maven read any of its own contents. Building it here is what
83+
# stops that class of thing hiding again.
84+
#
85+
# It also has to leave the root build alone: it declares a single source
86+
# file, so sharing target/ with the root build makes the compiler plugin's
87+
# incremental cleanup delete every class the root build just produced
88+
# (issue #39). That is why it writes to target-dlineage/, and why the
89+
# count check below is worth the two lines.
90+
- name: Build the separate dlineage POM, and check it leaves target/ alone
91+
shell: bash
92+
run: |
93+
set -euo pipefail
94+
before=$(find target/classes -name '*.class' | wc -l)
95+
mvn -B -f pom_dlineage.xml package -DskipTests
96+
after=$(find target/classes -name '*.class' | wc -l)
97+
echo "root classes before=$before after=$after"
98+
if [ "$before" != "$after" ]; then
99+
echo "::error::pom_dlineage.xml changed the root build's target/classes ($before -> $after); see issue #39"
100+
exit 1
101+
fi
102+
ls -l target-dlineage/*.jar
103+
78104
# The .bat scripts are the original Windows, no-Maven workflow: edit
79105
# setenv\setenv.bat, cd into a demo folder, run compile_<demo>.bat then
80106
# run_<demo>.bat. They had been stale for years -- compiling

.github/workflows/nightly.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,24 @@ jobs:
8383
- name: Check the results
8484
run: .github/scripts/check-test-results.sh
8585

86+
87+
# A second, separate build in the same directory that nothing used to run.
88+
# It carried a <parent> pointing at the private gudusoft:gsp_java reactor,
89+
# so it only built where that POM happened to be installed. Also asserts it
90+
# leaves the root build's target/classes alone (issue #39).
91+
- name: Build the separate dlineage POM
92+
shell: bash
93+
run: |
94+
set -euo pipefail
95+
before=$(find target/classes -name '*.class' | wc -l)
96+
mvn -B -f pom_dlineage.xml package -DskipTests
97+
after=$(find target/classes -name '*.class' | wc -l)
98+
if [ "$before" != "$after" ]; then
99+
echo "::error::pom_dlineage.xml changed the root build's target/classes ($before -> $after); see issue #39"
100+
exit 1
101+
fi
102+
ls -l target-dlineage/*.jar
103+
86104
- name: Every demo starts
87105
run: .github/scripts/run-all-demos.sh --timeout 90
88106

@@ -153,6 +171,24 @@ jobs:
153171
- name: Check the results
154172
run: .github/scripts/check-test-results.sh
155173

174+
175+
# A second, separate build in the same directory that nothing used to run.
176+
# It carried a <parent> pointing at the private gudusoft:gsp_java reactor,
177+
# so it only built where that POM happened to be installed. Also asserts it
178+
# leaves the root build's target/classes alone (issue #39).
179+
- name: Build the separate dlineage POM against the newest release
180+
shell: bash
181+
run: |
182+
set -euo pipefail
183+
before=$(find target/classes -name '*.class' | wc -l)
184+
mvn -B -f pom_dlineage.xml package -DskipTests -Dgsp.core.version=${{ steps.ver.outputs.version }}
185+
after=$(find target/classes -name '*.class' | wc -l)
186+
if [ "$before" != "$after" ]; then
187+
echo "::error::pom_dlineage.xml changed the root build's target/classes ($before -> $after); see issue #39"
188+
exit 1
189+
fi
190+
ls -l target-dlineage/*.jar
191+
156192
- name: Every demo starts
157193
env:
158194
MVN_ARGS: -Dgsp.core.version=${{ steps.ver.outputs.version }}

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,29 @@ moved on to `getOption().setTraceTablePosition(...)` and
695695
3.1.1.0 jar has. It now resolves the same parser the root build does, and
696696
builds and runs.
697697

698+
**It then failed a second way, for anyone but us.** It kept a `<parent>` of
699+
`gudusoft:gsp_java:1.0-SNAPSHOT`, the private library reactor, which is not
700+
published anywhere. On a machine that had never installed that POM, Maven
701+
stopped before reading the file at all:
702+
703+
```
704+
Non-resolvable parent POM for gudusoft:gsp_demo_java_dlineage:1.0-SNAPSHOT:
705+
Could not find artifact gudusoft:gsp_java:pom:1.0-SNAPSHOT
706+
```
707+
708+
The root `pom.xml` was cut loose from that parent when this repository was made
709+
buildable outside Gudu; this file was missed, and it looked fine to everyone who
710+
had the library checked out locally. The parent contributed nothing it needed:
711+
two compiler properties it already declares, an empty `<dependencies>`, and one
712+
`maven-antrun-plugin` marked `<inherited>false</inherited>`. It is gone, and the
713+
build now resolves `com.gudusoft:gsqlparser` from Gudu's public Maven repository
714+
and nothing else — verified against a completely empty local repository, where
715+
no `gudusoft/` group directory is created at all.
716+
717+
Both workflows now build it, and assert it left the root build's
718+
`target/classes` untouched. Nothing ran it before, which is why two separate
719+
breakages could sit in it unnoticed.
720+
698721
## master and dev branches
699722

700723
`master` is updated when a new GSP version is released on

pom_dlineage.xml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,24 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7-
<parent>
8-
<groupId>gudusoft</groupId>
9-
<artifactId>gsp_java</artifactId>
10-
<version>1.0-SNAPSHOT</version>
11-
</parent>
7+
<!-- No <parent>, for the same reason the root pom.xml has none: this used to
8+
inherit from gudusoft:gsp_java:1.0-SNAPSHOT, the private library reactor,
9+
which is not published anywhere. Anyone without that POM installed in
10+
their local repository got
11+
12+
Non-resolvable parent POM ... Could not find artifact
13+
gudusoft:gsp_java:pom:1.0-SNAPSHOT
14+
15+
before Maven even looked at this file's own contents. The root pom.xml
16+
was cut loose when the repository was made buildable outside Gudu; this
17+
one was missed, and nothing noticed because no workflow builds it.
18+
19+
The parent contributed nothing that is needed here: its only properties
20+
are maven.compiler.source/target 1.8, both declared below; its
21+
<dependencies> is empty; and its one plugin is maven-antrun-plugin marked
22+
<inherited>false</inherited>, cleaning .pas files out of the library's
23+
parser folder. There is no dependencyManagement, pluginManagement,
24+
distributionManagement or repositories section to lose. -->
1225

1326
<groupId>gudusoft</groupId>
1427
<artifactId>gsp_demo_java_dlineage</artifactId>

0 commit comments

Comments
 (0)