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

compile.native does not work with relative file paths with at least one directory #5426

Open
fwip opened this issue Oct 24, 2024 · 0 comments
Labels

Comments

@fwip
Copy link

fwip commented Oct 24, 2024

Describe and demonstrate the bug

In UCM, compile.native seems to fail when given a relative path with at least one directory to the output file, e.g:

scratch/main> compile.native main build/main.out

Fails with the following error:

open-output-file: error opening file
  path: /Users/fwip/.cache/unisonlanguage/racket-tmp/build/main.out.rkt
  system error: No such file or directory; errno=2
  context...:
   body of '#%mzc:unison-runtime
raco exe: source file does not exist
  path: /Users/fwip/.cache/unisonlanguage/racket-tmp/build/main.out.rkt

  Sorry, I got an error of type 'failed' when I ran `raco`, and I'm not sure what to do
  about it.
  
  For debugging purposes, the full command was:
  
    raco exe -o build/helloworld.out /Users/fwip/.cache/unisonlanguage/racket-tmp/build/main.out.rkt

Compile.native works correctly with absolute paths (/full/path/to/project/build/main.out), and with relative files without directories (main.out). Additionally, compilation to bytecode appears to work in all cases.

Here is a transcript:
compile-native-bug.output.md

Environment (please complete the following information):

  • ucm --version unison version: release/0.5.27 (built on 2024-10-01)
  • OS/Architecture: Mac Sonoma 14.6.1, CPU: Apple M1 Pro

Additional context
This is a papercut-level issue - just wanted to bring it to your attention.

@fwip fwip added the bug label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant