-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File name deduplication not working with ParseAndCheckFileInProject #819
Comments
All tools (VS, Ionide, Rider) use ParseAndCheckFileInProject, yet the latter two works nicely on Fable projects containing files with same name in different folders. So my guess is that you call the function in a wrong way. First question: do you pass full file name to it along with content? |
@alfonsogarciacaro I think I'd need to see the actual calls, e.g. by submitting a failing test. As @vasily-kirichenko says I suspect incorrect call parameters in some way |
Sorry, I should have included instructions to reproduce the problem. You can do it with Fulma and Fable 1.3.0-beta:
When Fable compilation is finished you can see the web in
My suspicion is this happens because there's also another file named Anyways, I'll try to submit a failing test 👍 |
@alfonsogarciacaro OK, I do see that that must be a problem - the modification implied by that de-duplication really needs to be applied to the ParseAndCheckFileInProject input too. Let me see if I can make a speculative PR which you can test |
@alfonsogarciacaro So #820 should do the trick |
@alfonsogarciacaro Tentative build of FCS 16.0.3 nupkg should eventually appear in artifacts of https://ci.appveyor.com/project/fsgit/fsharp-compiler-service/build/1586 |
OK, you can get the tentative nupkg at https://ci.appveyor.com/project/fsgit/fsharp-compiler-service/build/16.0.3/artifacts |
Sorry for replying so late, @dsyme. I tried the nupkg and it's working, thank you very much! Would it be possible to publish the fix in Nuget? |
I've temporarily published the tentative nupkg as Fable.FCS (I hope that's fine) and then published dotnet-fable 1.3.0-beta-002. @vasily-kirichenko Could you please give it a try? This version should recompile all files with a dependency to the modified file in a watch compilation. Please note you need also to update fable-loader to 1.1.4. Please note that I haven't updated other JS clients yet (Rollup, splitter), so they will ignore the dependencies. Pinging also @forki @MangelMaxime. |
… bug fsharp#819) (#3700) * fix de-duplication of individual files * bump fcs version
The new
ParseAndCheckFileInProject
is working great to get the AST of a single file, thanks again @vasily-kirichenko for that! I'm currently adding some dependency checks to Fable to make sure all the necessary files are being refreshed when a watch compilation is triggered. I'm having some issues, but hopefully I should be able to fix them soon.However, I've also noticed the trick implemented by @forki to deduplicate file names #748 (so you can have two files in different folders with the same name in the same project) doesn't work if I try to get the AST of a file with the same name as a previous one using
ParseAndCheckFileInProject
(it works if I useParseAndCheckProject
)Any idea what may be the reason?
The text was updated successfully, but these errors were encountered: