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
Fix #8816 (Dynlink/packing issue in bytecode with 4.08) #8818
Conversation
List.filter | ||
(fun id -> | ||
not (Ident.is_predef id) | ||
&& not (String.contains (Ident.name id) '.')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without knowing the context, this looks a bit strange. Where is the code that creates predefined identifiers with .
in their name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Well I guess those are the Ident.create_persistent (packagename ^ "." ^ name)
calls in bytecomp/bytepackager.ml
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, and you'll also notice a use of String.contains ... '.'
in that file as well. It's not pleasant, but there are a couple of PRs coming down the pipeline that will tidy up this stuff so I'm not in a hurry to fix it right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is not beautiful but it is simple and well-tested -- and it works. I agree with @lpw25's approach of getting the simplest fix out first, and then making things more robust in trunk.
I was going to push a @Octachron - given the report against 4.08.1+rc1, do you want this on 4.08? @gasche - there's no section in |
Yes, we want this in 4.08.1. We have a "4.08 maintenance branch" section in the 4.08 branch, we need to import it in the other banches. Let me take care of that right now. |
(Wouldn't it be nice if we had tooling support to more easily work with Changes entries? Just kidding.) |
You kid - I did a few months ago start to resurrect the tool I wrote in 2017, but it needs more than an hour or so's work to resurrect, so it sits on the spike for now until I have something really important I should be doing and need distracting from 😉 |
I put the Changes entries in order, all post-4.08 branches should now have a "4.08 maintenance" section. |
Thanks @gasche - I've rebased and pushed a Changes entry, so I think is ready squash and pick once CI reconfirms. |
If you allow a very minor nitpick, "Fix #N" is not a very good name for a PR. When I have to find them again in the PR list, such titles make me unhappy. I edited this one and the other one (I just repeated/summarized the name of the bug they are fixing); let's avoid them in the future. |
By the way, it makes sense to suggest GitHub autocomplete the PR title with the issue title itself, once you type 'Fix #xxxx' in the PR title. Would solve exactly this problem. |
Fix ocaml#8816 (Dynlink/packing issue in bytecode with 4.08) (cherry picked from commit e14a611)
…-4.08 Backport #8818 (Dynlink/packing issue in bytecode) for 4.08+rc2
This fixes #8816 by only including toplevel modules in the list of implementation imports of
.cmo
files.