Repository navigation
Change cli target detection issue 3705 - #3706
Conversation
|
My deduction in the second commit was apparantly faulty. I'll look into it. |
|
Another way to check for local clitool is like this: Basically reading the tool-manifest.json file. That would avoid invoking the tool. It's not as bullet proof though. |
|
This has become a bit of a mess due to all the different ways paket has been bootstrapped over time. It would have been nice to just have local or global clitool and ditch the rest, but that will probably break a lot of projects out there. When adding support for local clitool, we just added all the previous steps as they were after checking for local to avoid breaking things. My first attempt broke global tool support... |
|
I guess it's fine to check for local clitool after all the searching inside .paket folder, but we have to prioritize local clitool before global tool. |
d66711e to
7e68928
Compare
|
@atlemann what are the downsides of that approach? Because if it only supplies false negatives (saying the CLI tool isn't there when it is) we can just add that as an extra step before attempting with I've removed my second commit, and trying again. Debugging is hard when I can't get it to run locally. I'm trying to use VS Code on a Windows machine, but I can't seem to run the tests, and I've got all sorts of things that won't load correctly. Any thorough guide on getting a dev environment to run? |
|
When I tried to fix it the last time I was just doing manual testing by changing the paket.Restore.targets file in one of my own projects and setting |
|
Don't think there are any downsides by checking the tools-manifest except false negatives as you said. Then running |
|
Is this ready?
Atle Rudshaug <notifications@github.com> schrieb am So., 10. Nov. 2019,
07:01:
… Don't think there are any downsides by checking the tools-manifest except
false negatives as you said. Then running dotnet paket --version could
maybe be the last check if none of the others find anything.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3706?email_source=notifications&email_token=AAAOANAGL5K2JTJZQ5ZRYY3QS6PULA5CNFSM4JLHPYY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUWIHY#issuecomment-552166431>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOANAH4XRBIFYL7TXOE5TQS6PULANCNFSM4JLHPYYQ>
.
|
|
I don't think so. I haven't had time to try it, only looked at it on my phone. And I think maybe we should add that parsing of tools.json first to avoid invoking dotnet all the time. |
|
Can someone remind me. What are we doing with the Paket version in the targets file? |
|
Nothing, it's just used as a means to see if the process fails or not. Like, what's the cheapest paket command we can call to see if local tool invocation succeeds. |
|
I see. So we don't really need to parse the file right? Just check if it
exists and look for a substring. Might be much faster and easier to do.
Atle Rudshaug <notifications@github.com> schrieb am So., 10. Nov. 2019,
09:39:
… Nothing, it's just used as a means to see if the process fails or not.
Like, what's the cheapest paket command we can call to see if local tool
invocation succeeds.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3706?email_source=notifications&email_token=AAAOANESJCLTLB67ZBHXDV3QS7CEHA5CNFSM4JLHPYY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUYITY#issuecomment-552174671>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOANGA3FGZV7YZOXG7NITQS7CEHANCNFSM4JLHPYYQ>
.
|
|
Yes, IMHO we could replace invoking dotnet paket with checking the manifest file e.g. as shown in that comment I linked to. There might be better ways to check a file for some substring I msbuild though. |
|
And we should update paket.targets to keep them in sync. |
|
Ok, I'll try to sum up status for now: Primary concerns:
Secondary concerns:
|
|
Oh, and forgot another point - is adding "PaketDisableCliTest" something that should be introduced or not? I haven't tested it out yet (I do not have access to the code here that uses paket), and I'm wondering if it is, at all, useful anymore, with the other fixes in place? |
- improved docs in the file - minor cleanup and renamings
|
Hmm, there's a lot of failures under the "Allowed failures" section. Is that because they are flaky, or? |
|
Yes flaky tests that are on the backlog
Johny Woller Skovdal <notifications@github.com> schrieb am So., 10. Nov.
2019, 16:07:
… Hmm, there's a lot of failures under the "Allowed failures" section. Is
that because they are flaky, or?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3706?email_source=notifications&email_token=AAAOANFFUOK2N3TX2BDD4K3QTAPTRA5CNFSM4JLHPYY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDU7FSI#issuecomment-552202953>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOANGGCNZMWQECV2IRMODQTAPTRANCNFSM4JLHPYYQ>
.
|
|
Well, then I actually think this is a wrap for the main concern. That leaves:
Am I missing something? :) |
|
Nope, I'm getting this error while using local tools. when setting which means that the This is on Ubuntu btw. |
|
@forki ah, my bad, I thought that was for setting up .paket for the paket repo itself. Is that target file what is distributed to Full Framework installations using the old proj format then? @atlemann well that proves the switch works at least. ;) So in your environment, you do have the |
|
Yes, there's where I have it and it contains paket. Probably just a silly little thing. |
|
@atlemann it was indeed... Can you try it out again with the latest change? :) |
|
@JohnyWS Seems to work now. As for paket.targets, we just copied over the |
to .paket\*.targets
|
@atlemann I pushed the changes to both target files in the .paket folder now. Can you double check it still works for you? :) @forki and @atlemann : what about docs - or can we postpone that part? Would really like this change, because everytime someone updates a package, it overrides our local hack... :) |
|
I'm fine with release it as soon as we get that second sign off.
Johny Woller Skovdal <notifications@github.com> schrieb am Di., 12. Nov.
2019, 11:25:
… @atlemann <https://github.com/atlemann> I pushed the changes to both
target files in the .paket folder now. Can you double check it still works
for you? :)
@forki <https://github.com/forki> and @atlemann
<https://github.com/atlemann> : what about docs - or can we postpone that
part? Would really like this change, because everytime someone updates a
package, it overrides our local hack... :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3706?email_source=notifications&email_token=AAAOANDU55BA25ZIZB24WGDQTKAAXA5CNFSM4JLHPYY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDZYUUQ#issuecomment-552831570>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOANFLPY3LHNDCRJLVXJ3QTKAAXANCNFSM4JLHPYYQ>
.
|
|
I'm getting this for some reason: |
|
Hmm...seems to be an issue when building from VisualStudio, but doing |
|
Good catch! I'll look into it right away!
tir. 12. nov. 2019 12.45 skrev Atle Rudshaug <notifications@github.com>:
… Hmm...seems to be an issue when building from VisualStudio, but doing dotnet
build from the command line doesn't give that error.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3706?email_source=notifications&email_token=ABB265FZDFCMSMH3M3MOUXLQTKJNJA5CNFSM4JLHPYY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDZ7QSQ#issuecomment-552859722>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABB265GT5MAHDX3JYPZYLLDQTKJNJANCNFSM4JLHPYYQ>
.
|
|
A solution with only new SDK proj files which uses |
|
@atlemann Hmm, I seem to be needed a lot more details to reproduce it exactly. The case I've tried:
I could not make it fail like you did. Any details I'm missing? |
|
Hmmm... I just copy-pasted the raw paket.targets file from this PR into my solution and built in VS2019. I can try to do a proper clean and try again tomorrow at work. |
|
It seems to work. Not sure what happened yesterday, but I just tried copying it over again today and now it builds. |
|
So ready to go live?
Atle Rudshaug <notifications@github.com> schrieb am Mi., 13. Nov. 2019,
08:52:
… It seems to work. Not sure what happened yesterday, but I just tried
copying it over again today and now it builds.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3706?email_source=notifications&email_token=AAAOANB6DCB4AWOKEVXASTTQTOW4LA5CNFSM4JLHPYY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED5GW3A#issuecomment-553282412>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOANHDW3DZMH5QYPYG2GTQTOW4LANCNFSM4JLHPYYQ>
.
|
|
I believe so yes. Any objections @atlemann ? :) |
|
No, it should be fine. |
|
It would be nice to sync such changes with a fake release, but I have no idea how that would look like in practice... |
|
thanks! it's released |
|
Thanks! I just realized that our team working on this massive solution we have, had this same issue with the build hanging randomly. They just didn't tell me...and it didn't happen for me the few times I have built it lately. Works better now! |
|
hehe. awesome! |

This is only a workaround, that will solve most usecases, but still leave the problem intact for installations dependent upon the CLI. So this only ensures that all other installations that does not rely on the CLI approach experiences the bug that supporting it introduces.
I've changed 2 things to work around the issue:
Is that an acceptable approach? If yes, where should I document the feature?
Is that an improved priority? If not, why? If yes, should CLI be moved even further back? If yes, how long - and can that be moved to its' own issue if that is the case?
Also, when changing the file, I've added a few more lines of comments, and tried to align things a bit more.
In the main commit (7e68928) I have also removed a few instances where the Windows parts used ".exe" which does not seem to be needed when testing, resulting in fewer cases to test for.
In the secondary commit (d66711e) I have removed a case that seemed to be obsolete by now - non-CLI approach where paket is a dll. It appears that no path through target file will hit that logic. That allowed me to isolate the extension testing to the only case that needed it, so the test only runs in that case. Lastly I renamed "Internal" to "_" to match how "_PaketExeExtension" is named.
Fixes #3705