-
Notifications
You must be signed in to change notification settings - Fork 7
Single source of truth for the DiffDetective version #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| resultsdir=$1 | ||
| #!/usr/bin/env bash | ||
|
|
||
| java -cp "target/diffdetective-2.2.0-jar-with-dependencies.jar" org.variantsync.diffdetective.tablegen.MiningResultAccumulator $resultsdir $resultsdir | ||
| resultsdir="$1" | ||
|
|
||
| cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1 | ||
|
|
||
| java -cp "target/diffdetective-$(./scripts/version.sh)-jar-with-dependencies.jar" org.variantsync.diffdetective.tablegen.MiningResultAccumulator "$resultsdir" "$resultsdir" && | ||
| echo "genUltimateResults.sh DONE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,6 @@ | ||
| java -cp "target/diffdetective-2.2.0-jar-with-dependencies.jar" org.variantsync.diffdetective.validation.EditClassValidation | ||
| #!/usr/bin/env bash | ||
|
|
||
| cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1 | ||
|
|
||
| java -cp "target/diffdetective-$(./scripts/version.sh)-jar-with-dependencies.jar" org.variantsync.diffdetective.validation.EditClassValidation && | ||
| echo "runValidation.sh DONE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,6 @@ | ||
| java -cp "target/diffdetective-2.2.0-jar-with-dependencies.jar" org.variantsync.diffdetective.experiments.views.Main "docs/datasets/views.md" | ||
| #!/usr/bin/env bash | ||
|
|
||
| cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1 | ||
|
|
||
| java -cp "target/diffdetective-$(./scripts/version.sh)-jar-with-dependencies.jar" org.variantsync.diffdetective.experiments.views.Main "docs/datasets/views.md" && | ||
| echo "runValidation.sh DONE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| cd "$(dirname "${BASH_SOURCE[0]}")/.." | ||
|
|
||
| # extracts the first version tag in pom.xml | ||
| sed -n '/<version/ {s/.*version>\(.*\)<\/version.*/\1/; p; q}' pom.xml |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if simplifying our workspace is worth introducing potential bugs here. As you mentioned, this will break in case there are multiple built versions, right? Maybe we could have two (instead of one) version files: the pom.xml, and a version.txt (or so) which is a file that contains just the version number as plain text. We can then use this version file in all the shell scripts. Just an idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
Dockerfiles are not at risk for this problem because they build DiffDetective with a freshtargetfolder hence there will never be a second jar. The.shscripts I changed are problematic.An alternative would be to create a script which "parses" the
pom.xmland outputs the version. Then we could use that script in the other scripts. Note that this would be a very lax parser because I want to avoid introducing a dependency on something likexqfor developer machines.Adding a second "version" file kind of defeats the purpose in my opinion.
I also tested the Dockerfile right now to verify my claim: It doesn't actually build! The most relevant errors show that there is some Java version mismatch:
The last Functjonal update was in 3ceefb4. What motivated this commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the most important thing here is to end with a robust solution that does not easily break. If we have to overcomplicate things and make everything more fragile, I am fine with just having a bit of extra work when incrementing the version number: put the burden on the developer, not the user.
Apart from that, your
sedsolution looks good. It should be robust enough if reused within the other scripts.It's bad news that the Docker file breaks. We should fix this asap on main because that is what FSE reviewers see. Could you have a look at it? Should we have the docker file build functjonal by itself? It seems I messed up with rebuilding the new version of functjonal. It is probably enough to build functjonal anew with an older version of Java. (The motivation for 3ceefb4 was exactly to fix this error. Previously, I had rebuild functjonal to introduce some new feature I needed somewhere but the jar was build with an even newer version.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could repeat this error with the Dockerfile in
replication/esecfse22.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in #137