Fable Compiler Loses Project References

Created on 29 Nov 2019  Â·  11Comments  Â·  Source: fable-compiler/Fable

Description

It seems occasionally when compiling a project that has a project reference (in my case a shared project between the client and server) it fails to compile. The only thing that seems to do the trick is to remove and re-add the project to my client project's references. I clean the fable directory on every build, and have even restarted my computer when this occurred to make sure it wasn't some process holding onto it.

Expected and actual results

I'd expect my project to compile, but instead it gives numerous compiler errors for all the missing types defined in my shared project.

Related information

  • Fable version: 2.4.11
  • Operating system: Windows 10 Professional x64
  • Webpack version: 4.41.2
fable2-only?

All 11 comments

Hmm, I wonder if this is somehow related to #1940. Truth is I never see this kind of file path issues when working with Fable, so it's very difficult for me to reproduce. I wonder if it has to do with the operating system and/or the editor locking the files (I work on macOS/Linux and use VS Code/Rider and don't find issues).

  • How often does this happen?
  • Does it happen on the first build or when you're in watch mode and make a change?
  • When it happen, does it refuse to compile every time until you do something to "fix" it?

Truth is I never see this kind of file path issues when working with Fable

And this is when you have projects that reference a local project? One thing I've noticed since I created this issue, is that every time (or often enough, I can't remember if I've dodged the error or not at all when adding new packages) I add a new dependency (via paket) this issue arises.

I wonder if it has to do with the operating system and/or the editor locking the files

Could be, I'm using Visual Studio 2019 Community on the latest version.

How often does this happen?

I'm doing a lot of work on an application that uses a shared project right now, I've found that when I make changes to something in that project, it tends to happen a lot. There are plenty of cases where I've had it occur when I didn't modify that file as well though. I'm not entirely sure why.

Does it happen on the first build or when you're in watch mode and make a change?

It seems to never happen initially but after the first occurrence (always during HMR), it will persist even when doing a fresh build.

When it happen, does it refuse to compile every time until you do something to "fix" it?

Yes, no matter what I do it continues to complain that every type referenced in that shared project is not found.

I work in relatively big projects with or without Paket and with local project references and I don't notice these problems :confused: I wonder if this has to do with #1771. Is it possible to change the save file behavior in Visual Studio? Maybe you can try playing with Webpack watch options to see if this has any effect?

I haven't actually had this issue since I updated to netcore 3.1 and vs 16.4 shortly after I posted last week. ¯\_(ツ)_/¯

This hasn't happened in months, looks like it was something on Microsoft's end or inadvertently fixed here.

I am having this error since last week.
Nobody else on the team has the error

I am on netcore 3.1
Could this be reopened please?

Seeing this too almost every other day with a shared project. Luckily, I simply have to re-run fake build -t run and it always does the trick.

It seems to never happen initially but after the first occurrence (always during HMR), it will persist even when doing a fresh build.

The other way around for me. Never seen it happen once it's built and watching for changes.

I do sometimes do fake build -t run as I'm opening the solution in VS that day, so I'll try to keep an eye out if there's a connection there.

Has anyone seen this with latest Fable 3 beta?

I haven't had this issue pop up in 2020 ¯\_(ツ)_/¯

Given that there's no repro here, I think this could get closed.

Agreed! Please reopen if somebody still sees this issue.

Was this page helpful?
0 / 5 - 0 ratings