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

Q: What would you expect from package managers? #43

Open
arcanis opened this issue Jan 29, 2020 · 2 comments
Open

Q: What would you expect from package managers? #43

arcanis opened this issue Jan 29, 2020 · 2 comments
Labels
publisher question Further information is requested

Comments

@arcanis
Copy link

arcanis commented Jan 29, 2020

The @types packages (and particularly whether dependencies should be regular deps or peer deps, big subject) is a bit messy in terms of dependency graph. I was wondering if you had a rough idea what would the absolute best case look like, assuming an ideal world where perfect solutions exist.

For example, would it be peer dependencies everywhere? Regular deps everywhere? A bit of both? Unlisted dependencies? A separate dependency field that package managers would understand (typedDependencies or whatever)? No more @types package and .d.ts into every package? The package manager downloading the types without needing markup?

Even as a thought experiment I think it can be interesting to hear your opinion about "split ecosystems" such as what TypeScript users experience.

@sandersn
Copy link
Member

We've debated this in the Typescript team and I think the consensus is that we'd like a new dependency "typeDependency". But that's not perfect and requires lots more work from various people than other solutions.

If you look on this repo and the Typescript repo, I think you'll find more discussion of the problem.

@andrewbranch andrewbranch transferred this issue from microsoft/types-publisher Jun 4, 2020
@arcanis
Copy link
Author

arcanis commented Jun 4, 2020

Something I've been thinking lately was that perhaps packages should, as a general rule, simply list all their dependencies - regardless whether they'd be useful or not - and leave it to the package managers to remove the dependencies that don't make sense given the user context. For example, it would be trivial for us to simply ignore all @types dependencies.

The advantage with such an approach is that it's very backward compatible by design: the worse that can happen is that some users download some extra packages on older systems - which is better than not listing dependencies and introducing undefined behaviors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
publisher question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants