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

Newest fake-cli tries to invoke global Paket even when it's not there #2348

Closed
theimowski opened this issue Jul 2, 2019 · 11 comments
Closed

Comments

@theimowski
Copy link
Member

Description

The issue started appearing for SAFE template:

Starting target 'Build'
/tmp/c99a1e108ebc446f9e1c00aef5b4f45f/src/Server> "/usr/bin/dotnet" build (In: false, Out: false, Err: false)
Copyright (C) Microsoft Corporation. All rights reserved.
p/tmpd26d38b380e34c6da4c7787a31045d51.exec.cmd: paket: not found
/tmp/c99a1e108ebc446f9e1c00aef5b4f45f/.paket/Paket.Restore.targets(120,5): error MSB3073: The command ""paket" restore" exited with code 127. [/tmp/c99a1e108ebc446f9e1c00aef5b4f45f/src/Server/Server.fsproj]

Not sure what's the root cause, but there's some difference between fake-cli 5.13 and 5.15.1.
Using 5.13 as global tool I'm able to build a new safe template project on a fresh box, but when updating fake-cli to 5.15.1 I'm getting above error.

Initially though it was related to extracting new Paket.Restore.targets, but this happens also if I do PAKET_SKIP_RESTORE_TARGETS=true fake build

Repro steps

  1. docker run -it microsoft/dotnet:2.2-sdk-alpine
  2. apk add --update nodejs yarn
  3. dotnet tool install -g fake-cli
  4. export PATH="$PATH:/root/.dotnet/tools"
  5. mkdir safe && cd safe
  6. dotnet new -i SAFE.Template
  7. dotnet new safe
  8. fake build

If you do then:

  1. dotnet tool uninstall -g fake-cli
  2. dotnet tool install -g --version 5.13 fake-cli
  3. fake build

the project builds fine

@matthid
Copy link
Member

matthid commented Jul 2, 2019

But the error clearly talks about Paket.Restore.targets(120,5) I'm not sure this is related to FAKE (not more than the targets extraction topic).
Does dotnet build fail as well (without fake involved)?

@theimowski
Copy link
Member Author

yup, dotnet build fails as well

Right, so might be because older FAKE uses older Paket.Core / Paket.Restore.targets
This is strange though, as when using PAKET_SKIP_RESTORE_TARGETS the targets file stays untouched
I'll try to find changes in Paket.Restore.targets between those two versions of fake

@matthid
Copy link
Member

matthid commented Jul 2, 2019

But if you only run dotnet build fake is not involved in any way.

@theimowski
Copy link
Member Author

Correct, this might sound strange but that's actually expected: For SAFE apps we don't want to require full .NET / Mono anymore, hence there's no .paket/paket.exe when creating project from SAFE template. Instead we rely on FAKE global tool to build & run the project.
Recommendation is to use fake build - it does work with FAKE 5.13 but stopped with 5.15.1

@matthid
Copy link
Member

matthid commented Jul 2, 2019

Ah so you depend on not needing to run Paket?

@matthid
Copy link
Member

matthid commented Jul 2, 2019

I think the issue you run into is pretty much fsprojects/Paket#3608

I'm already in the process of fixing it but doing anything in msbuild is always a fuckup

@matthid
Copy link
Member

matthid commented Jul 2, 2019

Thanks for the report I didn't realize FAKE users depend on this 'performance' feature like this.

I guess it would be nice to have an integration test for this scenario

@theimowski
Copy link
Member Author

Ah so you depend on not needing to run Paket?

That's right.
When .net core 3.0 is out we'd ideally use Paket as local tool - I hope that way we can pin to specific version to mitigate breaking changes issues

matthid added a commit to fsprojects/Paket that referenced this issue Jul 2, 2019
@matthid
Copy link
Member

matthid commented Jul 2, 2019

I'm closing this, as it basically has been addressed, please follow the relevant issues to track the release. In particular, it will be released with #2347 once Paket has merged and released the change. Given that this is indeed a bit nasty I'll probably just release FAKE without any other changes. Which is likely tomorrow evening.

Funnily your comment as at the correct place after all as this was the PR which broke it ;)

@matthid matthid closed this as completed Jul 2, 2019
@matthid
Copy link
Member

matthid commented Jul 3, 2019

@theimowski 5.15.2 should be out in a couple of minutes, please report back if it indeed fixes the problem.

@theimowski
Copy link
Member Author

Thanks @matthid - looks like 5.15.2 fixes the issue 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants