Skip to content

Commit

Permalink
Merge pull request #785 from viperproject/issue-781
Browse files Browse the repository at this point in the history
Fix issue #781
  • Loading branch information
ArquintL authored Sep 10, 2024
2 parents dede1e6 + 4bf36eb commit bfdd55a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/viper/gobra/Gobra.scala
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class Gobra extends GoVerifier with GoIdeVerifier {
inFileConfig <- new ScallopGobraConfig(args, isInputOptional = true, skipIncludeDirChecks = true).config
resolvedConfig = inFileConfig.copy(includeDirs = inFileConfig.includeDirs.map(
// it's important to convert includeDir to a string first as `path` might be a ZipPath and `includeDir` might not
includeDir => Paths.get(input.name).getParent.resolve(includeDir.toString)))
includeDir => Paths.get(input.name).toAbsolutePath.getParent.resolve(includeDir.toString)))
} yield Some(resolvedConfig)
}
})
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/viper/gobra/frontend/Source.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ object Source {
* A unique identifier for packages
*/
val packageId: String = {
val prefix = uniquePath(TransformableSource(src).toPath.getParent, projectRoot).toString
val prefix = uniquePath(TransformableSource(src).toPath.toAbsolutePath.getParent, projectRoot).toString
if(prefix.nonEmpty) {
// The - is enough to unambiguously separate the prefix from the package name, since it can't occur in the package name
// per Go's spec (https://go.dev/ref/spec#Package_clause)
Expand Down

0 comments on commit bfdd55a

Please sign in to comment.