Skip to content

Panic in Windows when running on different mounts #4227

@DanielSchiavini

Description

@DanielSchiavini

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions