-
Notifications
You must be signed in to change notification settings - Fork 160
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
Make types returned by NEW_TYPE immutable #2395
Conversation
d760d5f
to
632c8a6
Compare
@fingolfin I have a special parametrised Jenkins build for such purposes - all it requires is to specify the PR number as a parameter (and it runs tests on Linux, macOS and Windows!). I will check this PR - you can invite me to review it so it will be on my radar. |
I'm not convinced this change does anything much. MakeImmutable applied to a positional object (which a type is) just resets the IsMutableObj bit in the type (which is not set anyway) and calls PostMakeImmutable on the object. You can only change a type through ![] and I can see no library code that does that. Any package that modifies types "by brute force" in this way, probably deserves whatever it gets :-) |
This has some impact on packages, indeed - the log reports:
I will look for more details in the log later. |
632c8a6
to
9770b0b
Compare
9770b0b
to
0558fd7
Compare
Codecov Report
@@ Coverage Diff @@
## master #2395 +/- ##
==========================================
+ Coverage 74.01% 74.01% +<.01%
==========================================
Files 484 484
Lines 245371 245377 +6
==========================================
+ Hits 181615 181625 +10
+ Misses 63756 63752 -4
|
0558fd7
to
1a76f92
Compare
@fingolfin I will run tests again with the newer version of this PR |
I remain unsure why this change will do anything at all. If it does cause changes, can we try and understand why before we merge anything. |
I fully agree and added the DO NOT MERGE LABEL. |
I've triggered a new Jenkins test this morning to check this PR with the latest selection of packages. Will post updates from the test logs later today. |
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.
I've re-run tests with a new selection of packages, and don't see any problems any more.
We already do that in HPC-GAP.
However, I am slightly worried that this might break some package which might try to modify a type object. Perhaps @alex-konovalov can run this PR through the full set of package tests somehow (if there is a way to do that w/o too much work, that is!)
@stevelinton any thoughts about this?