You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running pk fix in a go project, then PK generates dependency changes.
PK retrieves the (go) dependencies of the previous version as denoted by the latest git tag and compares these to the current dependencies.
PK fails if the previous version was using a go dependency referring to a GitHub release, that has been removed.
See the following sample stack trace for project exasol-rest-api.
In this case, the dependency github.com/veraison/go-cose previously referred to version v1.2.0 that is no longer available on GitHub.
❯ pk fix
Running .github/workflows/project-keeper.sh fix
Running Project Keeper 4.3.3 with mode fix from /home/chku/.m2/repository/com/exasol/project-keeper-cli/4.3.3/project-keeper-cli-4.3.3.jar
2024-08-16 09:05:03.012 [FINEST ] Executing command 'go list -f {{if not .Indirect}}{{.}}{{end}} -m all' in working dir '/home/chku/git/rest-api'...
Exception in thread "main" java.lang.IllegalStateException: E-PK-CORE-157:
Failed to list direct dependencies. Run 'go mod tidy' and try again.
at com.exasol.projectkeeper.sources.analyze.golang.GolangServices.getModuleInfo(GolangServices.java:147)
at com.exasol.projectkeeper.sources.analyze.golang.GolangSourceAnalyzer.analyzeSource(GolangSourceAnalyzer.java:42)
at com.exasol.projectkeeper.sources.analyze.golang.GolangSourceAnalyzer.lambda$analyze$0(GolangSourceAnalyzer.java:36)
at com.exasol.projectkeeper.sources.analyze.golang.GolangSourceAnalyzer.analyze(GolangSourceAnalyzer.java:36)
at com.exasol.projectkeeper.sources.SourceAnalyzer.analyzeSources(SourceAnalyzer.java:68)
at com.exasol.projectkeeper.sources.SourceAnalyzer.analyze(SourceAnalyzer.java:59)
at com.exasol.projectkeeper.ProjectKeeper.phase2AnalyzeSources(ProjectKeeper.java:137)
at com.exasol.projectkeeper.ProjectKeeper.runValidationPhases(ProjectKeeper.java:276)
at com.exasol.projectkeeper.ProjectKeeper.fix(ProjectKeeper.java:260)
at com.exasol.projectkeeper.cli.ProjectKeeperLauncher.runProjectKeeper(ProjectKeeperLauncher.java:73)
at com.exasol.projectkeeper.cli.ProjectKeeperLauncher.start(ProjectKeeperLauncher.java:67)
at com.exasol.projectkeeper.cli.ProjectKeeperLauncher.main(ProjectKeeperLauncher.java:61)
Caused by: java.lang.IllegalStateException:
E-PK-CORE-126: Failed to run command 'go list -f {{if not .Indirect}}{{.}}{{end}} -m all'
in '/home/chku/git/rest-api', exit code was 1 after PT0.43473546S. Output:
''
Error output:
'go: github.com/veraison/[email protected]: invalid version: unknown revision v1.2.0'
at com.exasol.projectkeeper.sources.analyze.generic.SimpleProcess.waitUntilFinished(SimpleProcess.java:102)
at com.exasol.projectkeeper.sources.analyze.golang.GolangServices.getModuleInfo(GolangServices.java:143)
... 18 more
The text was updated successfully, but these errors were encountered:
ckunki
changed the title
Fix failure for removed git release in dependencies of former version
Fix failure for removed git release in golang dependencies of former version
Aug 16, 2024
ckunki
added a commit
to exasol/exasol-rest-api
that referenced
this issue
Aug 16, 2024
ckunki
changed the title
Fix failure for removed git release in golang dependencies of former version
Fix failure for removed GitHub release in golang dependencies of former version
Aug 16, 2024
* Updated dependencies
* PK fix currently fails due to exasol/project-keeper#583
* Fixed linter errors
* Moved linter execution after tests to ensure dependencies are available
* Updated go version to 1.22, 1.23
Co-authored-by: Christoph Pirkl <[email protected]>
When running
pk fix
in a go project, then PK generates dependency changes.PK retrieves the (go) dependencies of the previous version as denoted by the latest git tag and compares these to the current dependencies.
PK fails if the previous version was using a go dependency referring to a GitHub release, that has been removed.
See the following sample stack trace for project exasol-rest-api.
In this case, the dependency github.com/veraison/go-cose previously referred to version
v1.2.0
that is no longer available on GitHub.The text was updated successfully, but these errors were encountered: