Mechanic
Mechanic copied to clipboard
Mechanic failed to resolve file order on Fulma-demo
I am working on the VSCode extension and tried to run Mechanic against Fulma-demo and it's failing to resolve the file order.
It's resolve an empty list: TopologicalOrder []
I tried to run it at the root level or from the src
folder the result is the same.
It works for me:
dotnet run -p src/Mechanic.CommandLine/ ../fulma-demo/src/Demo.fsproj
TopologicalOrder
["C:\dev\github\fulma-demo\src\Import\Fable.Import.Showdown.fs";
"C:\dev\github\fulma-demo\src\Import\Fable.Import.Lowdb.fs";
"C:\dev\github\fulma-demo\src\Global\Render.fs";
"C:\dev\github\fulma-demo\src\Global\Logger.fs";
"C:\dev\github\fulma-demo\src\Global\Router.fs";
"C:\dev\github\fulma-demo\src\Global\Database.fs";
"C:\dev\github\fulma-demo\src\Question\Index\Types.fs";
"C:\dev\github\fulma-demo\src\Question\Index\Rest.fs";
"C:\dev\github\fulma-demo\src\Question\Index\State.fs";
"C:\dev\github\fulma-demo\src\Question\Index\View.fs";
"C:\dev\github\fulma-demo\src\Question\Show\Answer\Types.fs";
"C:\dev\github\fulma-demo\src\Question\Show\Answer\Rest.fs";
"C:\dev\github\fulma-demo\src\Question\Show\Answer\State.fs";
"C:\dev\github\fulma-demo\src\Question\Show\Answer\View.fs";
"C:\dev\github\fulma-demo\src\Question\Show\Types.fs";
"C:\dev\github\fulma-demo\src\Question\Show\Rest.fs";
"C:\dev\github\fulma-demo\src\Question\Show\State.fs";
"C:\dev\github\fulma-demo\src\Question\Show\View.fs";
"C:\dev\github\fulma-demo\src\Question\Create\Types.fs";
"C:\dev\github\fulma-demo\src\Question\Create\Rest.fs";
"C:\dev\github\fulma-demo\src\Question\Create\State.fs";
"C:\dev\github\fulma-demo\src\Question\Create\View.fs";
"C:\dev\github\fulma-demo\src\Question\Dispatcher\Types.fs";
"C:\dev\github\fulma-demo\src\Question\Dispatcher\State.fs";
"C:\dev\github\fulma-demo\src\Question\Dispatcher\View.fs";
"C:\dev\github\fulma-demo\src\Types.fs";
"C:\dev\github\fulma-demo\src\State.fs";
"C:\dev\github\fulma-demo\src\App.fs"]
@jindraivanek This because it's already include in the fsproj.
Remove this lines and this will output an empty list.
I am new to Mechanic projet so perhaps this case is not supported yet
@MangelMaxime Yes, it takes source files in project as input, reorder them and update fsproj with new order. For me it behaves as expected.
We probably want to support adding new files to fsproj (with something like --add
flag) in the future.
@jindraivanek Ah ok, so for now we need to add the source file in the fsproj and then run mechanic. Good to know ^^