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
Naive implementation for #6097 #6098
Conversation
Hi @guybedford, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
the change per se looks good, however can you please also update test baselines so we can see overall impact?
Unittests baselines should be updated in code. Also since this will introduce new intrinsic name that user cannot rename we probably should either add a collision detection logic to make sure that there will be no identifiers named |
@vladima sure, I've updated the baselines and pushed that through. If going the collision detection route it might be nice to also only add the reference when it is already a free global |
thanks! can you please also update baselines in |
Sure, no problem... it looks like the tests are passing now. |
@guybedford great, thanks! |
@vladima is that a sign off? Is this ready to go in? |
Discussed offline; one current problem is that we'll never report an error if a user defines their own |
There isn't any actual conflict - if a user chooses to redefine |
👍 |
thanks @guybedford! |
Revert "Merge pull request #6098 from guybedford/master"
Thanks so much for the previous work in removing the `System` global dependency. I'm in the process of finalising the new Traceur plugin for SystemJS and will report back further if there are any further hitches. I just wanted to go back to this format adjustment in System.register before it is too late though. While discussing with @sebmck in the related Babel PR, it seemed a context object might be more appropriate as it can the accommodate and expand to fill whatever role the ES Module contextual syntax uses in future. I'd be interested to hear both your thoughts on this format adjustment. The PR here updates Traceur to use this idea of a context object argument with just one `id` property for now, which may well be a much more adaptable approach. This is in line with the updated Babel PR at babel/babel#3166 and I will also see if I can update the TypeScript PR at microsoft/TypeScript#6098 as well. Review URL: https://api.github.com/repos/google/traceur-compiler/issues/2051 Closes #2051.
As in #6097 this adds System.register
__moduleName
reference support.An optimization that can be included is to only add this argument when it is explicitly used in the code, making the output cleaner, but it would be removed by minification anyway if it is always output.