Skip to content

Fix Path bug#3810

Merged
wadoon merged 1 commit intomainfrom
weigl/fixpathbug
Apr 22, 2026
Merged

Fix Path bug#3810
wadoon merged 1 commit intomainfrom
weigl/fixpathbug

Conversation

@wadoon
Copy link
Copy Markdown
Member

@wadoon wadoon commented Apr 19, 2026

Related Issue

image

Type of pull request

  • Bug fix (non-breaking change which fixes an issue)

Ensuring quality

  • I have tested the feature as follows: manually, as it does not appear in the test cases.

@wadoon wadoon added this to the v3.0.0 milestone Apr 19, 2026
@wadoon wadoon requested a review from unp1 April 19, 2026 19:57
@wadoon wadoon self-assigned this Apr 19, 2026
Copy link
Copy Markdown
Member

@unp1 unp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. One question, is the filesystem is closed automatically when the path becomes garbage collected?

@wadoon wadoon added this pull request to the merge queue Apr 22, 2026
@wadoon
Copy link
Copy Markdown
Member Author

wadoon commented Apr 22, 2026

Thanks. One question, is the filesystem is closed automatically when the path becomes garbage collected?

The file systems are kept open, and should be closed after the program exists.

In the previous version, the ZipFileSystem was closed after every include, but this just cost performance. ZipFileSystem holds an internal map of opened file systems.

For JAR files, I think this behavior is acceptable. Nobody should alter or delete them anyway when KeY is running. For proof bundle, this looks different.

Merged via the queue into main with commit 40d194c Apr 22, 2026
36 checks passed
@wadoon wadoon deleted the weigl/fixpathbug branch April 22, 2026 10:52
@WolframPfeifer
Copy link
Copy Markdown
Member

Thanks. One question, is the filesystem is closed automatically when the path becomes garbage collected?

The file systems are kept open, and should be closed after the program exists.

In the previous version, the ZipFileSystem was closed after every include, but this just cost performance. ZipFileSystem holds an internal map of opened file systems.

For JAR files, I think this behavior is acceptable. Nobody should alter or delete them anyway when KeY is running. For proof bundle, this looks different.

Are you sure that this is a good idea? Does this not also prevent concurrent read access (because the file system throws a FileSystemAlreadyExistsException), for example if KeY is started twice from the same jar file? The latter is a not too uncommon use case imo.

Proof Bundles are not relevant here, since they are always extracted into a temporary directory first before reading from it. The possibility to alter a bundle (e.g. adding more proofs or changing them) is currently not implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants