Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 27 12:08
    BlythMeister commented #2714
  • Jan 16 12:51
    yazeedobaid commented #2729
  • Jan 16 09:38
    github-actions[bot] commented #2729
  • Jan 16 09:37
    jakob-ledermann opened #2729
  • Jan 11 11:03
    teo-tsirpanis commented #2728
  • Jan 11 08:53
    yazeedobaid commented #2728
  • Jan 10 20:00
    teo-tsirpanis opened #2728
  • Jan 10 14:31
    EverybodyKurts commented #2692
  • Jan 10 14:31
    EverybodyKurts commented #2692
  • Dec 22 2022 13:01
    babysnakes commented #2702
  • Dec 21 2022 19:06
    babysnakes commented #2702
  • Dec 21 2022 14:50

    yazeedobaid on master

    Bump version to 6.0.0-beta001 Merge pull request #2727 from f… (compare)

  • Dec 21 2022 14:50
    yazeedobaid closed #2727
  • Dec 21 2022 12:43
    yazeedobaid commented #2702
  • Dec 21 2022 12:24
    yazeedobaid closed #2643
  • Dec 21 2022 12:24
    yazeedobaid commented #2643
  • Dec 21 2022 12:23
    yazeedobaid closed #2646
  • Dec 21 2022 12:23
    yazeedobaid commented #2646
  • Dec 21 2022 12:22
    yazeedobaid closed #2695
  • Dec 21 2022 12:22
    yazeedobaid commented #2695
Balinth
@Balinth
Right now I just create a third TargetC that is the same as TargetB, and write TargetA ==> TargetC
Matthias Dittrich
@matthid
@Balinth There are final Targets (https://fake.build/core-targets.html#Final-targets) but I'm not sure if they are what you want...
Balinth
@Balinth
@matthid No, that's not it but thanks, for what its worth my current solution works fine, I just could not figure out if there is some built-in or idiomatic way of doing it (FAKE is the first build system that I actually use in more depth than just running someone else's script :))
Tomas Jansson
@mastoj

Hey, quick (I hope) question. If I want to run something like

    !! "src/**/*.fsproj"
        |> MSBuild.runRelease id buildDir "Publish"
        |> Trace.logItems "AppBuild-Output: "

Can I somehow have the output in a separate folder per project? Or do I have to do a Seq.iter and deal with that myself? It's not really convenient the way it is now since everything is outputted to the same folder.

Matthias Dittrich
@matthid
@mastoj Usually I'd recommend using a solution file, which has speed benefits. Any reason to use plain fsproj files?
Tomas Jansson
@mastoj
@matthid, easier to work with in vs code I think, that is the only reason.
Tomas Jansson
@mastoj
@matthid, will adding a sln file automatically create one folder for project in that solution if I specify the buildDir?
tried it quickly and it seems that everything is published to the same folder.
DavidSSL
@DavidSSL
Hi guys I believe that the answer to my problem has been addressed but I can't figure out how to search for it. Anyway the problem I'm currently facing is "Unsupported log file format. Latest supported version is 8, the log file has version 9.". Can someone point me in the right direction?
I'm currently using Fake 5.19.1
DavidSSL
@DavidSSL
I was able to find it and it's a post by @objectx on Mar 17 2020 08:56
LETTIER
@klettier_twitter
hello @DavidSSL I resolved the same kind of issue here cmeeren/fable-elmish-electron-material-ui-demo#14 by updating Fake.DotNet.cli package to 5.20
DavidSSL
@DavidSSL
@klettier_twitter thanks for your response. However, when I apply your suggestion, I get this:
-> BuildFailedException: Target 'CompileBackEndApps' failed.
StackTrace:
at Fake.Core.TargetModule.raiseIfError(OptionalTargetContext context) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 991
at Fake.Core.TargetModule.runOrDefault(String defaultTarget) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 1173
at <StartupCode$build_E1AC7ABCCCD45E49C616B55C21FE373018CC56643D81BE82B97077545708D50E>.$Build$fsx.main@() in \build.fsx:line 165
-> One or more errors occurred. (Method not found: 'Void BuildOptions..ctor(Options, BuildConfiguration, Microsoft.FSharp.Core.FSharpOption1<System.String>, Microsoft.FSharp.Core.FSharpOption1<System.String>, Microsoft.FSharp.Core.FSharpOption1<System.String>, Microsoft.FSharp.Core.FSharpOption1<System.String>, Boolean, Boolean, CliArguments)'.)
-> MissingMethodException: Method not found: 'Void BuildOptions..ctor(Options, BuildConfiguration, Microsoft.FSharp.Core.FSharpOption1<System.String>, Microsoft.FSharp.Core.FSharpOption1<System.String>, Microsoft.FSharp.Core.FSharpOption1<System.String>, Microsoft.FSharp.Core.FSharpOption1<System.String>, Boolean, Boolean, CliArguments)'.
StackTrace:
at Build.buildFunc@49.Invoke(BuildOptions p)
at Fake.DotNet.DotNet.build(FSharpFunc`2 setParams, String project) in D:\a\1\s\src\app\Fake.DotNet.Cli\DotNet.fs:line 1511
This problem was reported here fsharp/FAKE#2168 and also in this chat by @atlemann on Oct 23 2018 and @matthid provided a suggestion around this problem.
DavidSSL
@DavidSSL
In any case, for the original problem about "Unsupported log file format", @objectx 's suggestion of using DisableInternalBinLog =true works but I don't know the full repercussions of doing that apart from the fact some logging info will be lost.
The original problem started when I updated my .NET Core SDK from 3.1.100 to 3.1.300
I will try to do a repro of these issues and file a bug report if I can
DavidSSL
@DavidSSL
Ok after some more research this is what I found
DavidSSL
@DavidSSL
by updating my .NET Core SDK, one thing that might have happened is that MSBuild might have been updated. This previous statement might be completely rubbish but
if you refer to this fsharp/FAKE#2515
some people experienced the same problem that i did i.e. "Unsupported log file format. Latest supported version is 8, the log file has version 9."
I followed the other workaround suggested here https://github.com/fsharp/FAKE/issues/2515#issuecomment-633361690 resolved it for me
DavidSSL
@DavidSSL
It is pretty much @klettier_twitter 's solution but I also had to update my paket version
Leon Ingelse
@leoningelse_gitlab
Hi guys, does anyone have some experience with using psql within a Fake build script? I want to make a target that automatically creates a database for the project I'm working on.
Balinth
@Balinth
I did something like that with sqlite, but it should work just as well with psql. One way is to use FAKE's Process api to call psql's cli, and pass in the commands you would normally write in the terminal.
2 replies
Tomas Jansson
@mastoj
two hopefully simple question:
  • What is the difference between runXXX and build?
  • What is the difference between properties and params/setParams in a MSBuild step?
Tomas Jansson
@mastoj
Also, when building a solution containing multiple web apps, is it possible to publish to different folder relative to the root of the solution and not per project? I mean, running something like MSBuild.build setParams "my.sln", then in setParams I do set the PublishDir, but that setting will be relative to each project and I want it to be in ./build/publish/projectX and ./build/publish/projectY.
I guess this is limitations of dotnet/msbuild and has nothing to do with fake
Matthias Dittrich
@matthid
@mastoj I'd assume there are no meaningful differences, but it is more a set of legacy APIs, we might need to mark some of this stuff with obsolete if it isn't
On the other hand, I'd assume most people use dotnet cli instead of msbuild so the problem might solve itself over time?
@mastoj Regarding the Output, what you can try: Set an absolute dir but use a msbuild variable to specify the last directory name. If that isn't resolved you can try to produce the final value in msbuild. Or build the projects one by one (which I'm not recommending)
Tomas Jansson
@mastoj
thank you for the input @matthid, I should definitely use a DotNet instead of MSBuild. But I still have the same problem with things being outputted relative to the project root and not solution root, do you know how to set that msbuild variable when building a solution?
Tomas Jansson
@mastoj
I haven't found any variable that control the publish dir per project. PublishDir sort of does it but is it building in the context of the project. I can live with that, but would be nice to configure it more if possible
Matthias Dittrich
@matthid
@mastoj OutDir maybe?
Tomas Jansson
@mastoj
@matthid, not sure that works when I build the solution with the publish target since setting OutDir will apply to all projects with the solution so they all will publish to the same folder. I would need something like AppendTargetFrameworkToOutputPath but instead AppendProjectName or something.
I think I just have to settle with the fact that the publish folder must reside within the project folder, no biggie.
Matthias Dittrich
@matthid
@mastoj I'm pretty sure this can be solved, MSBuild is just hard to work with.
Tomas Jansson
@mastoj
@matthid , I guess it can be solved as well... but I have no clue on where to find info. I guess it exists some msbuild parameter
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