Skip to content

use rstrip to handle linux&windows seperators#139

Open
sandyspiers wants to merge 1 commit into
JuliaLang:mainfrom
sandyspiers:main
Open

use rstrip to handle linux&windows seperators#139
sandyspiers wants to merge 1 commit into
JuliaLang:mainfrom
sandyspiers:main

Conversation

@sandyspiers

Copy link
Copy Markdown

Before patch, on Windows, the source_path ends in '\' so pkgname comes out empty:

PS C:\Users\283710C\files\forks\JuliaC.jl> julia --project -e "using JuliaC; JuliaC.main(ARGS)" -- --output-exe app_test_exe --bundle build --trim=safe --experimental .\test\AppProject\
     Project No packages added to or removed from `C:\Users\283710C\AppData\Local\Temp\jl_6jgWPr\Project.toml`
    Manifest No packages added to or removed from `C:\Users\283710C\AppData\Local\Temp\jl_6jgWPr\Manifest.toml`
Precompiling packages finished.
  1 dependency successfully precompiled in 1 seconds
◒ Compiling...ArgumentError: Package  not found in current path.
- Run `import Pkg; Pkg.add("")` to install the  package.
Stacktrace:
  [1] macro expansion
    @ .\loading.jl:2405 [inlined]
  [2] macro expansion
    @ .\lock.jl:376 [inlined]
  [3] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2388
  [4] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2364
  [5] eval(m::Module, e::Any)
    @ Core .\boot.jl:489
  [6] eval
    @ .\Base_compiler.jl:146 [inlined]
  [7] top-level scope
    @ C:\Users\283710C\files\forks\JuliaC.jl\src\scripts\juliac-buildscript.jl:88
  [8] include(mod::Module, _path::String)
    @ Base .\Base.jl:306
  [9] exec_options(opts::Base.JLOptions)
    @ Base .\client.jl:317
 [10] _start()
    @ Base .\client.jl:550
in expression starting at C:\Users\283710C\files\forks\JuliaC.jl\src\scripts\juliac-buildscript.jl:80
✓ Compiling...
ERROR: Failed to compile .\test\AppProject\
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:44
 [2] compile_products(recipe::ImageRecipe)
   @ JuliaC C:\Users\283710C\files\forks\JuliaC.jl\src\compiling.jl:167
 [3] _main_cli(args::Vector{String}; io::Base.TTY)
   @ JuliaC C:\Users\283710C\files\forks\JuliaC.jl\src\JuliaC.jl:208
 [4] _main_cli(args::Vector{String})
   @ JuliaC C:\Users\283710C\files\forks\JuliaC.jl\src\JuliaC.jl:199
 [5] main(ARGS::Vector{String})
   @ JuliaC C:\Users\283710C\files\forks\JuliaC.jl\src\JuliaC.jl:214
 [6] top-level scope
   @ none:1
 [7] eval(m::Module, e::Any)
   @ Core .\boot.jl:489
 [8] exec_options(opts::Base.JLOptions)
   @ Base .\client.jl:283
 [9] _start()
   @ Base .\client.jl:550

This patch gets the example compiling on Windows.

@gbaraldi

Copy link
Copy Markdown
Member

I wonder if we can add a test that tests this directly?

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 this pull request may close these issues.

2 participants