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

Upgrade exercises to work in v0.7/v1.0 #121

Merged
merged 6 commits into from
Aug 9, 2018
Merged

Upgrade exercises to work in v0.7/v1.0 #121

merged 6 commits into from
Aug 9, 2018

Conversation

SaschaMann
Copy link
Contributor

@SaschaMann SaschaMann commented Aug 6, 2018

This should make all exercises and examples work on v0.7.

However, I'm having issues porting runtests.jl that I need help with. The previous way of running all exercise tests in a separate module doesn't work but I can't find enough information about the changes to include that prevent the old way from working.

The problematic line:
eval(Module(), :(include(joinpath($temp_path, "runtests.jl"))))

This throws the error

anagram example: Error During Test at /home/travis/build/exercism/julia/runtests.jl:34
  Got exception UndefVarError(:include) outside of a @test
  UndefVarError: include not defined
  Stacktrace:
   [1] top-level scope at none:0
   [2] eval at ./boot.jl:319 [inlined]
   [3] eval(::Module, ::Expr) at ./deprecated.jl:55
   [4] macro expansion at /home/travis/build/exercism/julia/runtests.jl:37 [inlined]
   [5] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1079 [inlined]
   [6] top-level scope at /home/travis/build/exercism/julia/runtests.jl:37 [inlined]
   [7] top-level scope at ./none:0
   [8] include at ./boot.jl:317 [inlined]
   [9] include_relative(::Module, ::String) at ./loading.jl:1040
   [10] include(::Module, ::String) at ./sysimg.jl:29
   [11] exec_options(::Base.JLOptions) at ./client.jl:235
   [12] _start() at ./client.jl:428

The dep warning says the following: Warning: `eval(m, x)` is deprecated, use `Core.eval(m, x)` instead. but changing that doesn't change the error above.

This could be fixed by running them in a separate Julia process, but that's not really a nice solution. I'm at a loss here on how to fix this.

@SaschaMann SaschaMann changed the title Upgrade exercises to work in v0.7 Upgrade exercises to work in v0.7/v1.0 Aug 9, 2018
@SaschaMann SaschaMann merged commit 418577b into master Aug 9, 2018
@SaschaMann SaschaMann deleted the 0.7-compat branch August 9, 2018 13:32
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.

None yet

1 participant