Skip to content
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

Readable#fileName is being used incorrectly #1284

Open
1 of 3 tasks
superaxander opened this issue Nov 22, 2024 · 0 comments
Open
1 of 3 tasks

Readable#fileName is being used incorrectly #1284

superaxander opened this issue Nov 22, 2024 · 0 comments

Comments

@superaxander
Copy link
Member

Multiple places across VerCors assume that Readable#fileName will be a valid path to an existing path. This is not always true. (for example if an input originates from stdin)

Places I've found so far:

  • SilverToCol passes the path to the Silver parser and then creates a new RWFile in the origin of AST nodes using the path in Silver's SourcePosition class. In b5e997d I've changed it to use Readable#underlyingPath when that is not None but you can still get crashes if there is no underlyingPath.
  • SerializeOrigin used fileName instead of underlyingPath (fixed in b5e997d)
  • Output.scala also uses fileName but it also creates these fileNames itself (so we know there are no folders that can get cut off and this is probably fine)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant