Skip to content

🚀 Compile v0/extensions in strict mode#29929

Merged
samouri merged 7 commits intoampproject:masterfrom
samouri:launchstrict
Aug 26, 2020
Merged

🚀 Compile v0/extensions in strict mode#29929
samouri merged 7 commits intoampproject:masterfrom
samouri:launchstrict

Conversation

@samouri
Copy link
Copy Markdown
Member

@samouri samouri commented Aug 21, 2020

Closes #19380

cc @lannka

@samouri samouri self-assigned this Aug 21, 2020
@amp-owners-bot
Copy link
Copy Markdown

Hey @rsimha! These files were changed:

build-system/compile/compile.js

Hey @danielrozenberg! These files were changed:

build-system/global-configs/experiments-config.json

@google-cla google-cla bot added the cla: yes label Aug 21, 2020
Copy link
Copy Markdown
Contributor

@rsimha rsimha left a comment

Choose a reason for hiding this comment

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

One more successful experiment? Yay!

@samouri
Copy link
Copy Markdown
Member Author

samouri commented Aug 21, 2020

One more successful experiment? Yay!

Also fixed a couple of bugs along the way / identified one more. They were all pre-existing bugs that this experiment just highlighted.

Fixed:

Identified (lower pri, caused by pub error):

@samouri
Copy link
Copy Markdown
Member Author

samouri commented Aug 25, 2020

This is currently failing the sourcemaps check, I believe I just need to update the check to look for this new first line (most likely 'use strict', TBD

@samouri
Copy link
Copy Markdown
Member Author

samouri commented Aug 25, 2020

@rsimha: can you review my sourcemap-check fix?

I couldn't easily figure out where the "generated" output for a file lives. I'm guessing the fix is correct, since the start column happened to move exactly the same number of chars as in 'use strict';, but I wasn't able to trace it.

Copy link
Copy Markdown
Contributor

@rsimha rsimha left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the sourcemap stuff, @samouri. I'll admit the test is not the easiest to maintain, but it's likely our best line of defense against real breakages. I've added some comments below. Let me know what you think.

@samouri
Copy link
Copy Markdown
Member Author

samouri commented Aug 25, 2020

Thanks for the review @rsimha. You made my job really easy :)

samouri added a commit that referenced this pull request Sep 15, 2020
ed-bird pushed a commit to ed-bird/amphtml that referenced this pull request Dec 10, 2020
* 🚀 Compile v0/extensions in strict mode

* Update compile.js

* sourcemap check: expect the usestrict

* fix fix

* raghu feedback

* lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run v0.js in strict mode

5 participants