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

Fable.sln does not restore #3687

Closed
nojaf opened this issue Jan 3, 2024 · 4 comments · Fixed by #3714
Closed

Fable.sln does not restore #3687

nojaf opened this issue Jan 3, 2024 · 4 comments · Fixed by #3714

Comments

@nojaf
Copy link
Member

nojaf commented Jan 3, 2024

I'm not able to run dotnet restore Fable.sln on the latest main:

dotnet restore .\Fable.sln                                                                                                                                                                                                       ❮  6s 727ms    1
  Determining projects to restore...
C:\Users\nojaf\Projects\Fable\tests\React\Fable.Tests.React.fsproj : warning NU1608: Detected package version outside of dependency constraint: Fable.Jester 0.33.0 requires Fable.Core (>= 3.2.8 && < 4.0.0) but version Fable.Core 4.2.0 was resolved. [C
:\Users\nojaf\Projects\Fable\Fable.sln]
C:\Users\nojaf\Projects\Fable\tests\React\Fable.Tests.React.fsproj : warning NU1608: Detected package version outside of dependency constraint: Fable.ReactTestingLibrary 0.33.0 requires Fable.Core (>= 3.2.8 && < 4.0.0) but version Fable.Core 4.2.0 was
 resolved. [C:\Users\nojaf\Projects\Fable\Fable.sln]
C:\Users\nojaf\Projects\Fable\tests\Js\Adaptive\Fable.Tests.Adaptive.fsproj : error NU1202: Package Expecto 10.1.0 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Expecto 10.1.0 supports: net6.0 (.NETCoreApp,Version=v6.0) [C
:\Users\nojaf\Projects\Fable\Fable.sln]
  Failed to restore C:\Users\nojaf\Projects\Fable\tests\Js\Adaptive\Fable.Tests.Adaptive.fsproj (in 194 ms).
  23 of 24 projects are up-to-date for restore.

I believe this goes undetected as the CI jobs don't restore any solution file.
I do find this rather annoying, would you accept a PR with a simple job that builds both solutions?

@MangelMaxime
Copy link
Member

It is possible that it goes undected because I forgot to run the Fable.Tests.Adaptive tests as part of the JavaScript tests suites.

else
Command.Run(
"dotnet",
"run -c Release",
workingDirectory = Path.Combine("tests", "Js", "Main")
)
// Test the Main tests against JavaScript
Command.Fable(fableArgs, workingDirectory = destinationDir)
testReact false

I would first check if running the tests catch the problem of that specific project. And depending on the answer add or not a dotnet restore instruction to either the CI or build script.

@nojaf
Copy link
Member Author

nojaf commented Jan 4, 2024

Running dotnet restore is typically a requirement to get IntelliSense in the IDE.
Your IDE will run it for you if you don't do it. Contributors shouldn't have to run any tests before opening the solution in their IDE, imho.

@MangelMaxime
Copy link
Member

MangelMaxime commented Jan 4, 2024

Sure, but running the tests should trigger the restore mechanism which should catch the fact that this project doesn't restore. So I don't think I am not totally off.

We can add a dotnet restore actions if we want to be explicit about it. This is just that's it is a first time for me to have that has part of the CI. Has in general it is checked indirectly by running tests, building the package in the CI etc.

@nojaf
Copy link
Member Author

nojaf commented Jan 26, 2024

In a way, this was also addressed in #3671.
As the solution is built in the analyzer job.

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

Successfully merging a pull request may close this issue.

2 participants