You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if I run dotnet femto src and I'm missing some npm packages, Femto considers the validation to be successful if there are no UnableToResolve actions:
It'd be nice to have a non-zero exit code in this case. Let's say I have a repo with multiple Fable apps and different developers working on each. Each app has its own package.json and I want to be sure all developers are installing the correct npm dependencies when they add a Nuget Fable package so I add dotnet femto to the CI to check all the apps. But Femto will only display the resolution actions and won't make the build script fail. It's true that devs should use dotnet femto install for new packages and that we should notice missing npm dependencies by manually checking the app or with (ehem) tests, but by running Femto in CI I can make sure that the right versions of the npm packages are installed.
Besides that, FemtoResult enumeration containst non-zero codes for "successful" outcomes, like PackageInstalled. Again, (un)install commands will probably be run in a terminal and not in a script, but who knows:
Hi @alfonsogarciacaro, just realized I haven't answered this in a while 😅 what you say makes sense, what do you think about a new argument ci which validates missing packages? i.e.
femto ci
which is basically just femto but returns exit code 0 when everything is fine
I forgot about this too! If you prefer to not make this the default and have it under a flag (still think it'd be nice if Femto exit code followed the usual convention: 0 success, >= 1 some problem), I would rather pick something with more obvious semantics like --strict.
Please note the issue is about the exit code, not about throwing an error. If I'm not mistaken, the result code will have no effect if femto is executed directly in the terminal, only when it's called by a script (and only when the script decides to check the exit code).
Currently if I run
dotnet femto src
and I'm missing some npm packages, Femto considers the validation to be successful if there are noUnableToResolve
actions:Femto/src/Program.fs
Lines 869 to 878 in 9035539
It'd be nice to have a non-zero exit code in this case. Let's say I have a repo with multiple Fable apps and different developers working on each. Each app has its own package.json and I want to be sure all developers are installing the correct npm dependencies when they add a Nuget Fable package so I add
dotnet femto
to the CI to check all the apps. But Femto will only display the resolution actions and won't make the build script fail. It's true that devs should usedotnet femto install
for new packages and that we should notice missing npm dependencies by manually checking the app or with (ehem) tests, but by running Femto in CI I can make sure that the right versions of the npm packages are installed.Besides that,
FemtoResult
enumeration containst non-zero codes for "successful" outcomes, like PackageInstalled. Again, (un)install commands will probably be run in a terminal and not in a script, but who knows:Femto/src/Prelude.fs
Lines 3 to 19 in 9035539
The text was updated successfully, but these errors were encountered: