-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
anonymous scopes for including files? #3661
Comments
I would expect |
|
You can do |
Good point. Could we have a nicer syntax for this:
|
That's what |
Not quite. There's the subtle difference that |
The backtrace issue is the biggest one for me, but maybe that should be a separate issue. |
Fixed by b97e7cf |
The test suite for MathProg has a set of files which I'd like to run in isolated scopes (one of the tests is for macro hygiene). What I'd like to say is something like:
let; include("test.jl"); end
where
test.jl
has someusing
statements. However, included modules "leak" between files, probably becauseusing
is a top-level statement. I can't find a reasonable way to do this. Other options include:evalfile
-- Backtraces are broken (they don't give a line number in the included file), so not great for a test suite.This doesn't quite work; if
testfile
contains:then for some reason, the module
MathProg
still won't be in scope.There are a few different ways this could be done. I'm just asking for at least one that works nicely.
The text was updated successfully, but these errors were encountered: