Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 15 04:02
    github-actions[bot] commented #2695
  • Aug 15 04:01
    aboy021 opened #2695
  • Aug 01 14:34
    yazeedobaid commented #2600
  • Aug 01 14:32

    github-actions[bot] on 5.23.0

    (compare)

  • Aug 01 14:32

    github-actions[bot] on master

    Bump version to 5.23.0 (compare)

  • Aug 01 14:15
    yazeedobaid closed #2666
  • Aug 01 14:15
    yazeedobaid commented #2666
  • Aug 01 13:53

    yazeedobaid on master

    Fake.Core.Process: stop using o… Fixes #2600. A duplicate item i… Merge pull request #2674 from k… and 4 more (compare)

  • Aug 01 13:53
    yazeedobaid closed #2694
  • Aug 01 13:53
    yazeedobaid opened #2694
  • Aug 01 13:52

    yazeedobaid on next

    `5.23.0` release Merge pull request #2693 from F… (compare)

  • Aug 01 13:52
    yazeedobaid closed #2693
  • Aug 01 13:52
    yazeedobaid opened #2693
  • Aug 01 13:47
    yazeedobaid closed #2600
  • Aug 01 13:47
    yazeedobaid closed #2600
  • Aug 01 13:47

    yazeedobaid on next

    Fixes #2600. A duplicate item i… Merge pull request #2690 from F… (compare)

  • Aug 01 13:47
    yazeedobaid closed #2690
  • Aug 01 13:47

    yazeedobaid on next

    Fake.Core.Process: stop using o… Merge pull request #2674 from k… (compare)

  • Aug 01 13:47
    yazeedobaid closed #2674
  • Aug 01 13:47
    yazeedobaid commented #2674
DavidSSL
@DavidSSL
On our company's build server, we have neither nodejs nor yarn installed globally. What we would like to do is have local installs of each of these packages. So I am trying to use Fake.JavaScript.Yarn. However, when I run
Fake.JavaScript.Yarn.install (fun o ->
                { o with
                    WorkingDirectory = someDirectory
                })
I get 'node' is not recognized as an internal or external command, operable program or batch file.
and rightly so
The question is how do I specify the path to node js given that I've got node.js.redist as a package
DavidSSL
@DavidSSL
I'm also open to other ideas of course
Florian Verdonck
@nojaf
@DavidSSL maybe set a local environment variable pointing to the redist package.
Matthias Dittrich
@matthid
@DavidSSL Usually we either query PATH (just like everything else) or you can specify the path to the executable manually (usually called ToolPath or ToolName or ExePath or something like that)
DavidSSL
@DavidSSL
Hey guys, thanks for your answer. I will try it tomorrow
@matthid I actually manually set the PATH to the node.exe from my redist package and re-ran the build.fsx script but I still got the same error.
DavidSSL
@DavidSSL
Also are you saying that I can reference the node package from Fake.JavaScript.Yarn?
DavidSSL
@DavidSSL

Ok looking at the source code, there is indeed a parameter called YarnFilePath. So that takes care of specifying the path to yarn. Now from @matthid 's advice, I correctly specified, albeit manually, the path to node and running the script worked.

However, I am now struggling with dynamically adding the node path to PATH:

Environment.setEnvironVar "PATH" nodeDirPath

because when I then run

let newEnvPath = Environment.pathDirectories

  newEnvPath
  |> Seq.iter(fun x ->
       Trace.log (sprintf "----->%s" x))

the new path is not there

Matthias Dittrich
@matthid
@DavidSSL Well, the pathDirectories variable is statically initialized, therefore it is set at the start of your script before your setEnvironVar code runs.
We have a couple of those, and sometimes it is desired to have the 'unmodified' state
If you want to use PATH you want to setup PATH before your start your script, otherwise use the YarnFilePath (or we need to update the module to support this scenario)
DavidSSL
@DavidSSL
@matthid Thanks for your answer. Setting the PATH beforehand is unfortunately not an option because the path to the node package changes. Updating the module I don't see how it would help because afaik there's no way to tell the yarn cli what the path to node is. Maybe I'm over-complicating things but thanks for your help. Very much appreciated.
DavidSSL
@DavidSSL

On a separate but related topic, in my build.fsxI've got

#r "paket:
storage: packages
nuget Fake.IO.FileSystem
nuget Fake.Core.Target
nuget Fake.DotNet.Cli
nuget Node.js.redist --version 12.16.3
nuget Fake.JavaScript.Yarn --version 5.20.1
//"

Even though I've deleted the .fake folder and the build.fsx.lock, the latest version of "Node.js.redist" is being downloaded. What is the correct way to pin the version?

Matthias Dittrich
@matthid
remove --version
DavidSSL
@DavidSSL
Thank you
DavidSSL
@DavidSSL
I use fakeusing dotnet tool install fake-cli --too-path to install fake. I also have my nuget packages defined in build.fsx as above. Now let's say I add a new Nuget package, what is the prescribed way to get the new package because running fake run build doesn't do it. I know that deleting build.fsx.lock and running the previous command will work but I was wondering if there is a better way
Matthias Dittrich
@matthid
deleting the file is the way to do it, we could have a command to to it but currently there is none implemented :)
DavidSSL
@DavidSSL
Ok got it
Matthias Dittrich
@matthid
By the way this was already discussed here: fsharp/FAKE#2100
DavidSSL
@DavidSSL
My googlefu wasn't powerful enough :(
Matthias Dittrich
@matthid
To be honest it took me quite a while to find it as well, even knowing that it existed somewhere :D
DavidSSL
@DavidSSL
:D
Masashi Fujita
@objectx
CreateProcess.warnOnExitCode have a signature string -> CreateProcess<unit> -> CreateProcess<unit>. Is it intended?
I think this caused by the eprintf "%s" msg line. Type inference engine fills the <_> with <unit>.
Matthias Dittrich
@matthid
@objectx Probably not intended
BahKoo
@BahKoo
My MSBuild.build targets are significantly faster when I set DisableInternalBinLog to true but I don't understand what I'm losing by disabling this. Does anyone know?
Masashi Fujita
@objectx
I've created the fsharp/FAKE#2534 for relaxing CreateProcess.warnOnExitCode usage.
Andreas Vilinski
@vilinski

I have a library targeting appnetcore3.1 in a private nuget feed. Having trouble using it from fake.
the source line in paket.dependencies looks like this:

// [ FAKE GROUP ]
group Build
    storage none
    source https://jfrog.private.com/artifactory/api/nuget/nuget-repo username: "%ARTIFACTORY_USER%" password: "%ARTIFACTORY_USER_PASS%"
    nuget Fake.DotNet.Cli
    nuget Fake.IO.FileSystem
    nuget Fake.Core.Target
    nuget MyLib // <- libray from private nuget source

I suspect the package handling in fake is outsorced to paket. It actually wors for me in another solution.
The problem with fake is - the resulting intellisense_lazy.fsx file doesn't include my library and fake complains about unknown namespace in open statement in the build script. I have no clue why it should not work out of the box...
Is there any way how I can diagnose this?

Andreas Vilinski
@vilinski
I think it is also not yet usable with "nuget: MyLib" from F# preview?
Matthias Dittrich
@matthid
@vilinski You need to target netstandard2.0
Andreas Vilinski
@vilinski
@matthid I can't - there are some apis used, not included in netstandard2.0.
Matthias Dittrich
@matthid
The current situation is that you then cannot use it in fake or need to add a workaround (for example using reflection)
Tomas Jansson
@mastoj

Hello. Trying to run some xunit tests, but I get this error:

Script reported an error:
-> BuildFailedException: Target 'Test' failed.
-> One or more errors occurred. (trying to start a .NET process on a non-windows platform, but mono could not be found. Try to set the MONO environment variable or add mono to the PATH.)
-> trying to start a .NET process on a non-windows platform, but mono could not be found. Try to set the MONO environment variable or add mono to the PATH.

My target looks like:

open Fake.Core
open Fake.DotNet
open Fake.DotNet.Testing
open Fake.IO.Globbing.Operators
open Fake.IO.FileSystemOperators
open System.IO

Target.create "Test" (fun _ ->
    Trace.log " --- Running tests --- "
    !! (testDir @@ "**/Release/bin/*.Tests.dll")
    |> XUnit2.run (fun p -> { p with HtmlOutputPath = Some (testDir @@ "xunit.html") })
)

Isn't that supposed to run on dotnet core?

Tomas Jansson
@mastoj
I figured I could use DotNet.test, but how do I get the html output if I use that?
kariem-ali
@kariem-ali
Hi everyone!
I am trying to run tests targeting multiple test frameworks (nunit, vstest, xunit) as part of the same target. They all have failing tests. I want them all to run, but it seems whichever runs first (with failing tests) causes Fake to shortcircuit and report a failed build without running the other tests targeting the other frameworks. Is there a way to make fake run them all? (I am running Fake 4 on full .NET framework)
using:
Fake.DotNet.Testing.VSTest
Fake.DotNet.Testing.NUnit3
kariem-ali
@kariem-ali
Fake.DotNet.Testing.XUnit2
Andreas Vilinski
@vilinski
Hi, does anybody know how to solve the error here? Can't build a project anymore. I have latest fake-cli and paket:
There was a problem while setting up the environment:
-> Error during parsing of '/home/bla/myrepo/paket.lock'.
-> failed to parse line '      System.Text.Json (>= 5.0) - restriction: || (>= net461) (&& (< net5.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1))' (invalid parameter 'net5.0' after >= or < in '< net5.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1))') (Could not parse 'framework: restriction: || (>= net461) (&& (< net5.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1))' as key/value pairs.)
        -  invalid parameter 'net5.0' after >= or < in '< net5.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1))'
        -  Could not parse 'framework: restriction: || (>= net461) (&& (< net5.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1))' as key/value pairs.
        -> invalid delimiter at position 22
mecusorin
@mecusorin_twitter
@vilinski this is a paket message, nothing to do with fake. Try again in fsprojects/Paket gitter channel
mecusorin
@mecusorin_twitter
@vilinski most probably, Paket doesn't recognize the net5.0 from the restrictions tokens
Andreas Vilinski
@vilinski
thank you
yes, the problem is surely related to net5.0. But the installed paket tool has no problem with producing and parsing paket.lock file.
can it be fake-cli uses own, older paket version, different from installed one?
latest alpha of fake-cli did it, don't know why
Return null
@VoidAsync_twitter
It looks like Fake is referencing Paket 5.251, I think Paket 6 is needed for .net5 support