Skip to content
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

feat: remove feature flag eszip #50

Merged
merged 6 commits into from
Jun 21, 2022
Merged

Conversation

EwanValentine
Copy link
Contributor

@EwanValentine EwanValentine commented Jun 21, 2022

🎉 Thanks for sending this pull request! 🎉

Which problem is this pull request solving?

Removes the use eszip feature flag.

Closes: #51

Checklist

Please add a x inside each checkbox:

  • I have read the contribution guidelines.
  • [] The status checks are successful (continuous integration). Those can be seen below.

A picture of a cute animal (not mandatory but encouraged)

@EwanValentine EwanValentine requested a review from a team June 21, 2022 08:41
@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jun 21, 2022
Skn0tt
Skn0tt previously approved these changes Jun 21, 2022
@Skn0tt
Copy link
Member

Skn0tt commented Jun 21, 2022

gotta fix some tests, but looks good generally :)

@EwanValentine
Copy link
Contributor Author

@Skn0tt yep! Just spotted those, they didn't fail locally weirdly! On it 🙂

src/bundler.ts Outdated
@@ -65,21 +54,16 @@ const bundle = async (
functions,
importMap,
}),
bundleESZIP({
Copy link
Member

Choose a reason for hiding this comment

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

This means that we'll always generate two bundles (JS and ESZIP), which in the long term we don't want to do. What do you think about changing the logic so that:

  • we use true as the default value for edge_functions_produce_eszip, so that it'll be enabled for CLI deployments
  • if the edge_functions_produce_eszip flag is enabled, we generate only ESZIP
  • if the edge_functions_produce_eszip flag is disabled, we generate only JS — this allows us to still flip a switch and go back to JS bundles in buildbot if something goes wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ohhhh gotcha, yeah makes sense to me, good shout!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed: da27e7a

@eduardoboucas
Copy link
Member

(Also make sure to rename the PR to feat: before merging, so that release-please works as expected.)

@EwanValentine EwanValentine changed the title Feat/remove feature flag eszip feat: remove feature flag eszip Jun 21, 2022
src/bundler.ts Outdated
await importMap.writeToFile(distImportMapPath)
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to get around the statement limit per arrow function, hopefully, this isn't too arbitrarily grouped

Copy link
Member

Choose a reason for hiding this comment

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

How do you feel about it? I would actually prefer to ignore the rule in this case, because it feels a bit arbitrary to break this bit out into a separate function just to satisfy the linter, and I think it actually makes the code a bit more difficult to follow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I definitely agree, wasn't sure how we felt about ignoring the linter though, but there didn't really seem to be a particularly clean split anywhere. I'll update to ignore it for this function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated: 549e9fd

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we should avoid ignoring rules generally. But in this case it does feel arbitrary, and we can perhaps discuss as a group whether we can make it a bit more lax.

Copy link
Member

@eduardoboucas eduardoboucas left a comment

Choose a reason for hiding this comment

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

Great work!

@EwanValentine EwanValentine merged commit da6377b into main Jun 21, 2022
@EwanValentine EwanValentine deleted the feat/remove-feature-flag-eszip branch June 21, 2022 11:10
Skn0tt pushed a commit to netlify/build that referenced this pull request Apr 23, 2024
* chore: remove eszip feature flag

* chore: remove eszip feature flag

* chore: fixed tests

* chore: refactored to reduce statement limit

* chore: disable max line limit eslint rule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove eszip feature flag in edge-bundler
3 participants