You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Group "Main" and framework "auto-detect" fails when paket install #2011
On our work projects, we used to have 2 groups in our paket.dependencies file.
A 'group Main' and a 'group build'. It was working well and if I understand well, 'Main' is the default group...
I used it with success in one of my opensource project but failed to use it on most of our work projects with the error "The framework restriction could not be determined" during a paket install.
After a lot of time, I think I've found where it comes from.
In fact, specifying the 'group Main' is not 100% equivalent to not specifying it (contrary to what I thought... should it be equivalent?)
When you don't use the 'group Main', the install work with 'framework: auto-detect'.
When you add the 'group Main', the install fail.
Is that normal?
If yes, perhaps, something should be added to the documentation that the 2 options are incompatible.
If no, it seems that there is a bug...
I think options that are defined at top level don't appear in groups, if you define top level options while having group Main explicitly defined I'd expect the behaviour to still be that way.
Maybe a warning can be given if top level options are defined as well as an explicit Main group, I think this is better than a special rule for group Main
@smoothdeveloper That's what I imagined but specifying the options in the 'Main' group don't work either :(
If I have for example a paket.dependency file :
framework: auto-detect
source https://nuget.org/api/v2
//group Main
nuget xunit
group Build
framework: 4.5
redirects: off
source https://nuget.org/api/v2
nuget GitVersion.CommandLine
It works. But since I uncomment the group line, that fail. And repeating the 'framework' or 'source' option in the 'main' group do not solve the problem :(
To narrow the problem, that's just that we can't use the framework: auto-detect inside a group :(
It begins to be very annoying...
I hope it could be fixed soon.
After some other test, my previous message was not perfectly right (I should have missed something at work this afternoon...).
The exact failing case is when you explicitly define the group Main with framework: auto-detect.
If you remove group Main, it works. You could get it when following the git history of the repository...
I will retry at work for my case tomorrow but it seems not blocking (even if somewhat quite not beautiful!!).
I will just have to remove all the group Main that colleagues used to put on every of our repositories :(
A fix is welcomed but perhaps not so urgent... I let you know.
Even if, funnily, the fix arrived 20 min too late ;) I was presenting this feature to my team and was obliged to say that there was a limitation...to see it fix when leaving the meeting :D
Activity
smoothdeveloper commentedon Nov 8, 2016
I think options that are defined at top level don't appear in groups, if you define top level options while having
group Mainexplicitly defined I'd expect the behaviour to still be that way.Maybe a warning can be given if top level options are defined as well as an explicit Main group, I think this is better than a special rule for group Main
pmiossec commentedon Nov 8, 2016
@smoothdeveloper That's what I imagined but specifying the options in the 'Main' group don't work either :(
If I have for example a paket.dependency file :
It works. But since I uncomment the group line, that fail. And repeating the 'framework' or 'source' option in the 'main' group do not solve the problem :(
pmiossec commentedon Nov 24, 2016
To narrow the problem, that's just that we can't use the
framework: auto-detectinside a group :(It begins to be very annoying...
I hope it could be fixed soon.
forki commentedon Nov 24, 2016
pmiossec commentedon Nov 24, 2016
Sure. With pleasure. I will do that...
pmiossec commentedon Nov 24, 2016
Here is a repo with the problem: https://github.com/pmiossec/ReproPaketFwkAutodetectAndGroup
After some other test, my previous message was not perfectly right (I should have missed something at work this afternoon...).
The exact failing case is when you explicitly define the
group Mainwithframework: auto-detect.If you remove
group Main, it works. You could get it when following the git history of the repository...I will retry at work for my case tomorrow but it seems not blocking (even if somewhat quite not beautiful!!).
I will just have to remove all the
group Mainthat colleagues used to put on every of our repositories :(A fix is welcomed but perhaps not so urgent... I let you know.
pmiossec commentedon Nov 26, 2016
Thanks for the fix (and for all your work!)
Even if, funnily, the fix arrived 20 min too late ;) I was presenting this feature to my team and was obliged to say that there was a limitation...to see it fix when leaving the meeting :D
Anyway, great stuff!! Thanks again.