-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Switch depName/packageName logic #16012
Comments
sounds good, i think we can do it in multiple steps. |
let's clear some things up:
|
I think it's easiest to do them all at once. We will need to think about the repercussions for
By default, only
We would aim for it not to be breaking |
So regex manager should set |
that's what i was thinking about current users, they will need to stop using depName in their regex managers, and start using packageName... it would be breaking i believe |
That's not what @viceice meant. He meant:
|
Today
renovate/lib/modules/datasource/index.ts Line 344 in e4dbd4a
in packageRules we have definition: renovate/lib/util/package-rules.ts Lines 41 to 42 in e4dbd4a
usage: renovate/lib/util/package-rules.ts Line 160 in e4dbd4a
Instead of trying matching against then we should add 2 new matchers to the need to check if
|
I don't think there's any reason to set |
@dalbani better if you start a fresh discussion about this, ideally with a reproduction repo if it's possible. In short: matchPackageNames used to match against |
Do I see it correctly that there are still some presets using Searching with https://github.com/search?q=repo%3Arenovatebot%2Frenovate%20path%3A%2F%5Elib%5C%2Fconfig%5C%2Fpresets%5C%2F%2F%20matchPackageNames&type=code, I see quite a few presets. We are getting the If I'm readying this right, I'm happy to open a PR that replaces all |
@morremeyer yes I think you have it right. I haven't yet done a search through our presets to see if any should swap from matchPackageNames to matchDepNames, so it would be appreciated if you can do that and raise a PR! BTW the only time we need matchDepNames is when depName and packageName are different, and |
@rarkins But we do still need either of the two for a To be honest, every time I read up on the difference between the two, I forget it very quickly afterwards and there's no explanatory documentation about the differences and intricacies of the two, so I need to get myself up to speed every time 😁 Might be worth to add that somewhere. |
The way it works today is: always have depName, use packageName optionally if the "lookup name" is different. Warn if a matchPackageNames matches depName but not packageName. The way it will work in future is: always have packageName, use depName optionally as a "pretty name"/"short name". Hence why we warn today, because in future we don't fall back to checking depName for matchPackageNames.
|
I would like to achieve this by having more strict typings for manager extractions. Dependencies need to have We sometimes also extract incomplete and skipped dependencies, in which case |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Needs more context but looks ok to me |
Does this documentation need to be changed from https://docs.renovatebot.com/modules/manager/regex/#advanced-capture |
See #28834 |
What would you like Renovate to be able to do?
Instead of defaulting to
depName
, and allowingpackageName
as an optional override, we should instead default to extractingpackageName
, and allowingdepName
optionally.If you have any ideas on how this should be implemented, please tell us here.
We would need to make changes to each manager's extract function, which will touch most managers but not be complex.
There may be a small change to
datasource
index logic because now it does not need the depName->packageName fallback.But then there are other areas of the code which assume
depName
is always present.One in particular is
packageRules
. TodaymatchPackage*
actually functions on thedepName
field and not thepackageName
. We might need to do something like:packageName
firstOr maybe instead we could:
matchDepNames
andmatchDepNamePatterns
fieldsdepName
for one major releasedepName
matching fallback in a later releaseUltimately this issue is going to require some exploration and testing - it's hard to predict everywhere it might cause changes
Is this a feature you are interested in implementing yourself?
Maybe
The text was updated successfully, but these errors were encountered: