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

Msbuild max cpu #2772

Closed
wants to merge 3 commits into from
Closed

Conversation

TheAngryByrd
Copy link
Contributor

@TheAngryByrd TheAngryByrd commented Jan 30, 2024

Description

Allows properties like MaxCpuCount to be used on unix.

Mostly checking CI to see if it breaks something.

If available, link to an existing issue this PR fixes. For example:

TODO

Feel free to open the PR and ask for help

  • New (API-)documentation for new features exist (Note: API-docs are enough, additional docs are in help/markdown)

  • unit or integration test exists (or short reasoning why it doesn't make sense)

    Note: Consider using the CreateProcess API which can be tested more easily, see https://github.com/fsharp/FAKE/pull/2131/files#diff-4fb4a77e110fbbe8210205dfe022389b for an example (the changes in the DotNet.Testing.NUnit module)

  • boy scout rule: "leave the code behind in a better state than you found it" (fix warnings, obsolete members or code-style in the places you worked in)

  • (if new module) the module has been linked from the "side navigation" menu, edit docs/data.json.

  • (if new module) the module is in the correct namespace.

  • (if new module) the module is added to Fake.sln (dotnet sln Fake.sln add src/app/Fake.*/Fake.*.fsproj)

  • Fake API guideline is honored

@xperiandri
Copy link
Collaborator

I wonder why was it disabled before 🙂
Do you know?

@xperiandri
Copy link
Collaborator

Could you add the line about this to the release notes?
https://github.com/fsprojects/FAKE/pull/2778/files

@TheAngryByrd
Copy link
Contributor Author

I wonder why was it disabled before 🙂 Do you know?

My guess is it's a holdover from the mono/xbuild days.

@Numpsy
Copy link
Contributor

Numpsy commented Jul 11, 2024

Looks like the changes to the flags cause some unit test failures:

Fake.DotNet.MSBuild.Tests.Test that /restore is included #2160 failed in Fake.DotNet.MSBuild.Tests.Test that we can create simple msbuild cmdline failed in 00:00:00.0010000. 00:00:00.0350000. 
Expected a given cmdline.. String does not match at position 10. Expected char: 'p', but got 'm'.
expected: /restore /p:RestorePackages=False
  actual: /restore /m /nodeReuse:False /p:RestorePackages=False
   at Fake.DotNet.MSBuildTests.tests@28-88.Invoke(Unit _arg2) in /home/runner/work/FAKE/FAKE/src/test/Fake.Core.UnitTests/Fake.DotNet.MSBuild.fs:line 40
   at Fake.ExpectoSupport.ExpectoHelpers.withTimeout@126.Invoke(Unit unitVar) in /home/runner/work/FAKE/FAKE/src/test/Fake.ExpectoSupport/ExpectoHelpers.fs:line 126
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in D:\a\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 447
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 104
--- End of stack trace from previous location ---

Expected a given cmdline.. String does not match at position 1. Expected char: 'p', but got 'm'.
expected: /p:RestorePackages=False /p:OutputPath=C:%5CTest%5C
  actual: /m /nodeReuse:False /p:RestorePackages=False /p:OutputPath=C:%5CTest%5C
   at Fake.DotNet.MSBuildTests.tests@13-86.Invoke(Unit _arg1) in /home/runner/work/FAKE/FAKE/src/test/Fake.Core.UnitTests/Fake.DotNet.MSBuild.fs:line 25
   at Fake.ExpectoSupport.ExpectoHelpers.withTimeout@126.Invoke(Unit unitVar) in /home/runner/work/FAKE/FAKE/src/test/Fake.ExpectoSupport/ExpectoHelpers.fs:line 126
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in D:\a\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 447
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 104
--- End of stack trace from previous location ---

Maybe needs changing around

?

@xperiandri
Copy link
Collaborator

Will you fix the conflict?

@TheAngryByrd
Copy link
Contributor Author

Probably not for a while. Won’t be near a computer for a few days.

@Numpsy
Copy link
Contributor

Numpsy commented Jul 21, 2024

I can't update the PR, but I did try pushing a rebased version into https://github.com/Numpsy/FAKE/tree/msbuild-max-cpu as a test (the conflict is just in the release notes again).

I also noticed that the release note change here says Allow settting Msbuild - 3 t's in 'settting'

@xperiandri
Copy link
Collaborator

xperiandri commented Jul 25, 2024

@TheAngryByrd have you gotten back?

@Numpsy
Copy link
Contributor

Numpsy commented Jul 27, 2024

I've had a go at fixing the merge issues in #2789 in case getting it up to date is helpful

@xperiandri xperiandri closed this Jul 27, 2024
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 this pull request may close these issues.

3 participants