-
-
Notifications
You must be signed in to change notification settings - Fork 458
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
Support probing path #557
Support probing path #557
Conversation
can the approach u used in JetBrainsAnnotations.Fody be pushed to other weavers via FodyPackaging https://github.com/Fody/Fody/tree/master/FodyPackaging |
|
||
var candidates = FodyFiles.Where(x => string.Equals(Path.GetFileName(x), packageFileName, StringComparison.OrdinalIgnoreCase)) | ||
.OrderBy(ProbingPathScore) | ||
.ThenByDescending(VersionReader); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than re parsing the version on every package lookup. shouldnt this be parsed and stored once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was like this before, so I assumed this will be called only once per weaver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just step 1: make it work
I'm still working on optimizing this.
Yes, I already thought about extending FodyPackaging, just had no time to look at it yet... |
3b7e55a
to
2564aa3
Compare
FodyPackaging does now automatically add the .props file. |
…cy search only on demand.
…known weavers and should not require a legacy scan.
OK, I think that's it. |
I'll be off for a week, then I can update readme and docu
LG
Tom
…________________________________
Von: Simon Cropp<mailto:notifications@github.com>
Gesendet: 30.09.2018 06:27
An: Fody/Fody<mailto:Fody@noreply.github.com>
Cc: tom-englert<mailto:mail@tom-englert.de>; Author<mailto:author@noreply.github.com>
Betreff: Re: [Fody/Fody] Support probing path (#557)
Merged #557<#557> into master.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#557 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJwYwtnqCnEb2sZqIALrbKMwwjAgu6Wiks5ugEgpgaJpZM4W8VXQ>.
|
This is the initial version supporting the
WeaverProbingPaths
idea discussed on gitter.It is done with minimal changes to the existing code and fully backward compatible.
It currently improves selecting the correct weaver if the weaver provides the
.props
file and so adds itself to theWeaverProbingPaths
poperty.When there are enough weavers supporting this, I will start optimizing the code, to look at the probing paths first and omit the other search paths if all weavers have been located.
It can be tested with https://www.nuget.org/packages/JetBrainsAnnotations.Fody/, versions 2.3 and 2.4 have added support for this.