-
Notifications
You must be signed in to change notification settings - Fork 3.5k
optional param to prevent function overwriting #16364
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
optional param to prevent function overwriting #16364
Conversation
f597e26 to
f936a5b
Compare
|
I think it might be good to add a test. What is more, I think we have a test the deliberately overrides some system library, so I'm surprised that that test is not now failing. |
Test case have been added. Previous tests with rewriting don't fail because of optional flag by default in mergeInto (still rewrites functions by default) |
sbc100
left a comment
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.
@juj are you OK with this being an error? Or would you rather see it be warning? I think you are the only user of the symbol overriding that I know of.
|
It looks like some of the test failures are because you need to merge (or rebase) with origin/main. |
It's better to have error rather than warning for us because:
|
Its possible we could add it as a warning and have On the other hand I agree it would be simpler if we could just stick to and error (and force library authors to opt in with |
…o_check_collisions
This reverts commit 38392ed.
|
Another suggestion - to add function |
…o_check_collisions
Thanks for looking out and accommodating.. it does sound ok to me to make this an error, we should be able to adjust our libraries, and with a clear error message like it is now, it does guide users to what kind of modification they need to do to their code if the override is intentional. One thing that comes to mind is it seems that now the filename that causes the error is not printed? That would be great to see. Although don't want to rope extra work from @Stuonts if we don't have that facility available now. (at a quick glance to utility.js and compiler.js I'm not sure if we do) Another way might be to make it a warning and enable the |
|
@juj |
Head branch was pushed to by a user without write access
|
@sbc100 |
No description provided.