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

Consider "un-vendoring" packages #460

Closed
harrysarson opened this issue Oct 23, 2020 · 3 comments
Closed

Consider "un-vendoring" packages #460

harrysarson opened this issue Oct 23, 2020 · 3 comments

Comments

@harrysarson
Copy link
Collaborator

#446 has got me wondering whether the pro/con balance has shifted since we decided to vendor all our elm dependencies. Opening this issue to discuss whether we can un-vendor them again.

@harrysarson
Copy link
Collaborator Author

Context:

Both these lint rules come from package code we have inlined due to complications arising from installing extra packages. Maybe now that we use elm-json and the whole dependency resolving thing is much more solid now we could revisit these deps and see if we can un-inline them.

Originally posted by @harrysarson in #446 (comment)

I have a very similar situation in elm-review where I also generate parts of the code to be run and where I have vendored some dependencies to avoid complications. I have prefixed/moved those to a Vendor folder and ignored all of my rules for that folder.

Originally posted by @jfmengels in #446 (comment)

@jfmengels
Copy link
Contributor

I vendorize the code in elm-review for 2 reasons:

  1. To avoid naming conflicts where a user has a module with the same name as a module from the dependency. I prefix the module name with something unlikely to have a conflict, like Vendor.Elm.Review.SomeModuleName.

  2. To avoid dependency conflicts: If elm-review depends on foo/bar v1 and the user also depends on foo/bar but v2, then the compiler will complain and the tool will be unusable for them. By vendorizing/inlining, that problem goes away and the user is free to use whatever they want.

I imagine these problems could still appear in elm-test, so I think that vendoring is still a good idea, until at least Elm allows for multiple major versions for dependencies.

@harrysarson
Copy link
Collaborator Author

Makes sense! Both (1) and (2) would be really annoying errors too.

Looks like we need to keep the vendored code around for now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants