-
Notifications
You must be signed in to change notification settings - Fork 66
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
Installing the helix-pipeline in the project confuses the execution #513
Comments
I think that the locally installed modules should win over the ones provided by |
Yes, I agree. But we need to make sure people include the pipeline only if they really know what they are doing and for that, we would need to extract the "utils" stuff (like the VDOM APIs) that people may need more frequently without the need to get the ownership of the full pipeline. |
but we anyways include the entire helix-pipeline into the deployed action. so if they choose to have a different version in their local project due to backward compatibility reason, the local version should be included. maybe, on the long run, it would even be better, to not to provide any runtime packages with helix-cli, and force people to include helix-pipeline in their projects. so it is more transparent what is included in the action. we could bundle all that's needed in a helix-ow-runtime, so they need to include less packages. @trieloff WDYT? |
That's probably where we have the biggest disagreement ;) In the default and basic use of the product, you do not want to think about the pipeline, which version, backward comp... it should just work. And that's not the case if you add the pipeline to use the VDOM API. But we engineer this stuff the other way around, for the worst case scenario and the customer which will want to customise everything. |
ok, what we could do, is to check if the local installed version of the pipeline is the same as the one in helix-cli. this would probably even be simple than messing with the module loader to use the correct modules. |
I think breaking the pipeline-utils into a separate package/repo would be a good thing to do anyway. This way we minimize the exposure of things that a customer would want to forcibly upgrade/downgrade. |
it will always be a problem when people using different versions of modules in the local development as helix uses in |
the clean approach would really be to force people to use helix-pipeline in their package. as I wrote above:
|
But that also means you must have a |
true. but we can generate it on |
Going |
maybe we can be smart about it:
|
Let's leave out that condition and simply have a |
Suggestion:
|
I was looking more deeply into this problem. so from the i.e. when listing the module path during
in but I can reproduce your problem @kptdobe. so maybe it's a problem with the
which makes it use the |
I also verified the packager. it includes local project modules, but always takes precedence of the modules provided by so for now, it is probably easier to fix the behaviour in the simulator to use the |
Just catching up on all the helix goodness that's happened over the past few weeks. So what is the recommendation at this point, given the discussion here? Leave the dependency out of a helix site's package.json, or go ahead and add it in? I'm trying to see if it is worth reopening and merging https://github.com/adobe/developer.adobe.com/pull/115 or not. |
@filmaj with the current version (v0.13.5), having the helix-pipeline in the local project is no longer a problem. |
Only the pipeline is safe to include, or is helix-cli ok to include as well? |
should be ok.. |
If you need to use some
helix-pipeline
utils or APIs (like the VDOM API) in apre.js
, it is natural to install@adobe/helix-pipeline
as a dependency of the project. But by doing so,hlx up
andhlx deploy
will use the locally installed helix-pipeline and as you update hlx-cli will quickly "confuse" the execution because an older (newer is possible too) version will be used.To reproduce:
Edit the
package.json
and change the@adobe/helix-pipeline
dependency to a previous version (simulate what will happen when you upgrade hlx-cli but forget to align the dependency here).Run
npm install
and finally runhlx up
. If you are lucky, it might work but there are great chances that the current helix-cli requires a newer version of the pipeline and fails.This is pretty vicious and you might remove the dependency from the
package.json
but do not remove it from thenode_modules
folder. The helix-cli ends up in a corrupted state which is really hard to identify why.We should protect our end-user to reach that point.
Note that this should be true if you install @adobe/helix-cli or any library that have the pipeline as a dependency.
cc @tripodsan
The text was updated successfully, but these errors were encountered: