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: webpack test stack #3240
feat: webpack test stack #3240
Conversation
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.
lgtm
I think we should add a bit of documentation somewhere about this. |
(a follow-up PR to fix this would be highly appreciated) |
This PR was more of a POC to see if the team is ok for the implementation. I'll write a Readme on this |
test/bundler/webpack/bundler-test.js
Outdated
|
||
// Untill there is no proper solution for bundlers, the fastify version | ||
// is set to undefined for this context | ||
test('Bundler should work with bad plugin version, undefined version', t => { |
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.
Is this test going to pass or not? I'm not sure it would. Maybe we should skip it in case - I want all the CI to stay green.
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.
So theorically on a non bundled environment it would fail, but on bundled environment because of the fallback in here:
Line 688 in a90c68b
return pkg.name === 'fastify' ? pkg.version : undefined |
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.
Can you clarify the comment so that it's clear what we should change here?
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.
Sure
I think a simple solution for the webpack problem might be to store only the major within the source code. This does not create an addition of the maintenance burden and it provides a minimal version of this feature for bundled usage. |
In my opinion, that's effectively removing the feature. We routinely release new features as part of minor, and sometimes even patch, that define a new minimum version for applications. For example, if you want to access |
I'm happy to completely disable the feature for webpack usage. |
Do we aim to land it this way and find a solution for the version resolution in a further pr? (should i rebase?) |
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.
LGTM let's land this as is and then evolve.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Aim to fix: #3158
So i've setup everything in a side test stack because this is not something we want to focus on when developing / fixing issues in fastify. Webpack and webpack-cli are kind of heavy weight packages and we don't want to arm developer experience with those.
Currently the bad version plugin registration will not make the build fail in the current state of
fastify
. I'm ok to land it this way untill we find a proper solution for the release process.