by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 20 00:23
    github-actions[bot] closed #2519
  • Sep 18 19:35
    github-actions[bot] commented #2544
  • Sep 18 19:35
    tforkmann edited #2544
  • Sep 18 19:34
    tforkmann opened #2544
  • Sep 18 00:22
    github-actions[bot] labeled #2491
  • Sep 18 00:22
    github-actions[bot] commented #2491
  • Sep 16 00:22
    github-actions[bot] closed #2510
  • Sep 10 13:11
    robertpi synchronize #2542
  • Sep 09 17:00
    matthid commented #2543
  • Sep 09 16:59
    matthid synchronize #2539
  • Sep 09 16:59

    matthid on next

    Allow users of nunit3 set envir… Implement env vars for nunuit3 … fix copy / paste error and 1 more (compare)

  • Sep 09 16:59
    matthid closed #2543
  • Sep 09 14:50
    robertpi synchronize #2543
  • Sep 09 14:30
    robertpi commented #2543
  • Sep 09 14:26
    robertpi synchronize #2543
  • Sep 08 18:05
    DavidSSL commented #2518
  • Sep 08 18:04
    DavidSSL closed #2518
  • Sep 08 18:04
    DavidSSL commented #2518
  • Sep 06 19:48
    matthid commented #2518
  • Sep 06 15:08
    DavidSSL commented #2518
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

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)