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

Panic in Windows when running on different mounts #4227

Open
DanielSchiavini opened this issue Sep 6, 2024 · 0 comments · May be fixed by #4228
Open

Panic in Windows when running on different mounts #4227

DanielSchiavini opened this issue Sep 6, 2024 · 0 comments · May be fixed by #4228

Comments

@DanielSchiavini
Copy link
Contributor

DanielSchiavini commented Sep 6, 2024

Version Information

  • vyper Version (output of vyper --version): at least 0.3.4~0.4.0
  • OS: windows
  • Python Version: 3.11

What's your issue about?

Compiler panics with error "path exists outside base folder".

  • This error was encountered in this workflow.
  • Apparently the working folder in Github actions is overridden to the D: drive. The Vyper binary and/or the files being compiled are in the C: drive.
  • Even if we use the --standard-json input, importing built-in interfaces will raise this error.

For example in Vyper 0.4.0, the standard json input:

{
  "language": "Vyper",
  "settings": {
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode.object"
        ]
      }
    }
  },
  "sources": {
    "contracts/Foo.vy": {
      "content": "\nfrom ethereum.ercs import IERC20\n\n@external\ndef foo() -> int128:\n    return 13\n"
    }
  }
}

Results in:

{
  "compiler": "vyper-0.4.0",
  "errors": [
    {
      "component": "compiler",
      "formattedMessage": "unhandled exception path is on mount 'C:', start on mount 'D:'\n\n  contract \"contracts/Foo.vy:2\", line 2:0 \n       1\n  ---> 2 from ethereum.ercs import IERC20\n  -------^\n       3\n\n\nThis is an unhandled internal compiler error. Please create an issue on Github to notify the developers!\nhttps://github.com/vyperlang/vyper/issues/new?template=bug.md",
      "message": "unhandled exception path is on mount 'C:', start on mount 'D:'",
      "severity": "error",
      "sourceLocation": {
        "file": "contracts\\Foo.vy"
      },
      "type": "CompilerPanic"
    }
  ]
}

How can it be fixed?

We probably need to be more careful when using relative paths.

@DanielSchiavini DanielSchiavini changed the title Panic in windows when binary and source are on different mounts Panic in Windows when running on different mounts Sep 6, 2024
@charles-cooper charles-cooper linked a pull request Sep 6, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant