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

sk/reloaded #25455

Merged
merged 2 commits into from
Jan 20, 2018
Merged

sk/reloaded #25455

merged 2 commits into from
Jan 20, 2018

Conversation

StefanKarpinski
Copy link
Sponsor Member

For CI testing...

@StefanKarpinski
Copy link
Sponsor Member Author

StefanKarpinski commented Jan 8, 2018

Passed on FreeBSD, Win64. Unrelated failure on Win32 (restarted). Investigating macOS spawn failure. Update: spawn tests pass locally on macOS, so I assume the Travis failure is unrelated.

src/toplevel.c Outdated
@@ -165,6 +165,11 @@ jl_value_t *jl_eval_module_expr(jl_module_t *parent_module, jl_expr_t *ex)
jl_module_t *newm = jl_new_module(name);
jl_value_t *defaultdefs = NULL, *form = NULL;
JL_GC_PUSH4(&last_module, &defaultdefs, &form, &newm);
// copy parent environment info into submodule
jl_sym_t *uuid_sym = jl_symbol("#uuid");
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would probably be better to make this part of the actual structure of the jl_module_t, rather than making it an cryptic error to define a function named uuid.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's named #uuid not uuid so you can't accidentally use this name; we can certainly do that once we get this working, but in the meantime, this was much easier to get going with.

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functions do for their types, though — I believe this was Jameson's point:

julia> @eval $(Symbol("#uuid")) = 1
1

julia> @eval $(Symbol("#uuid"))
1

julia> uuid() = 2
uuid (generic function with 1 method)

julia> @eval $(Symbol("#uuid"))
typeof(uuid)

Copy link
Sponsor Member Author

@StefanKarpinski StefanKarpinski Jan 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem solved: 4fe702e. We can make it part of the module once this is all settled.

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't that conflict with mangled names in lowering now?

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea. How many hashes do I need to stick in front of this thing to make it safe?

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that depends on how many nested closures you want to support before it clashes?

@StefanKarpinski
Copy link
Sponsor Member Author

Note to self: 4fe702e passes on FreeBSD, and Win64 (Win32 failure is a timeout).

@StefanKarpinski StefanKarpinski force-pushed the sk/reloaded branch 3 times, most recently from e8efe35 to f42006a Compare January 11, 2018 17:14
io = IOBuffer()
write(io, UInt8(0))
uuid = pkg.uuid
write(io, uuid === nothing ? UInt128(0) : UInt128(uuid))
Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just use UUID(UInt128(0)) as a sentinel value instead of nothing to avoid the union here.

@StefanKarpinski
Copy link
Sponsor Member Author

StefanKarpinski commented Jan 20, 2018

The failures all seem to be unrelated so I’m pulling the trigger on this finally!

@StefanKarpinski StefanKarpinski merged commit a103ea3 into master Jan 20, 2018
@StefanKarpinski StefanKarpinski deleted the sk/reloaded branch January 20, 2018 19:24
@JeffBezanson
Copy link
Sponsor Member

Whoa!! 🎉 💯

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.

4 participants