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

depName/lookupName -> depName/packageName #14341

Closed
rarkins opened this issue Feb 21, 2022 · 2 comments
Closed

depName/lookupName -> depName/packageName #14341

rarkins opened this issue Feb 21, 2022 · 2 comments
Assignees
Labels
breaking Breaking change, requires major version bump status:in-progress Someone is working on implementation type:refactor Refactoring or improving of existing code

Comments

@rarkins
Copy link
Collaborator

rarkins commented Feb 21, 2022

Describe the proposed change(s).

Our approach to extracting and looking up dependencies might be easier to understand and align with external concepts if we:

  • use packageName instead of lookupName (it's a package name we look up)
  • default to extracting packageName and extract depName only if there's some sort of "alias" or "short name" for it, which 95% of the time doesn't happen

A challenge would be how to handle matchPackage... matching in packageRules. Most of the time depName===lookupName so it gets the same result, but there's times when we have a "short" name for depName which is currently being matched, and actually we have no way to match a package rule against lookupName. In future I would like depName to be mostly cosmetic but happy to add matchDepNames. The challenge is if we switch matchPackageNames to match against packageName then there may be some existing rules which no longer match.

Perhaps we could add matchDepNames, and then with matchPackageNames we first try to match against packageName and then fall back to depName and warn of a migration need is there's a match?

@rarkins rarkins added type:refactor Refactoring or improving of existing code status:requirements Full requirements are not yet known, so implementation should not be started priority-5-triage labels Feb 21, 2022
@rarkins rarkins added the breaking Breaking change, requires major version bump label Feb 28, 2022
@rarkins
Copy link
Collaborator Author

rarkins commented Feb 28, 2022

Shall we do this along with #9940 in a major release at the end of the week? Maybe pause all non-essential PR merging Thursday evening and I can get it done Friday

@rarkins rarkins self-assigned this Mar 3, 2022
@rarkins rarkins added status:in-progress Someone is working on implementation and removed status:requirements Full requirements are not yet known, so implementation should not be started labels Mar 3, 2022
@rarkins
Copy link
Collaborator Author

rarkins commented Mar 4, 2022

Closed by #14490

@rarkins rarkins closed this as completed Mar 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking Breaking change, requires major version bump status:in-progress Someone is working on implementation type:refactor Refactoring or improving of existing code
Projects
None yet
Development

No branches or pull requests

1 participant