Skip to content
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

error FABLE: Cannot resolve System.IO.TextWriter.Write #122

Closed
nojaf opened this issue Nov 16, 2018 · 4 comments · Fixed by #124
Closed

error FABLE: Cannot resolve System.IO.TextWriter.Write #122

nojaf opened this issue Nov 16, 2018 · 4 comments · Fixed by #124

Comments

@nojaf
Copy link
Member

nojaf commented Nov 16, 2018

Using 5.0.0-alpha-002

fable: Compiled .fable\Fable.React.5.0.0-alpha-002\Fable.Helpers.ReactServer.fs
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(20,13): (20,30) error FABLE: Cannot resolve System.IO.TextWriter.Write
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(21,13): (21,30) error FABLE: Cannot resolve System.IO.TextWriter.Write
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(22,13): (22,31) error FABLE: Cannot resolve System.IO.TextWriter.Write
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(23,13): (23,29) error FABLE: Cannot resolve System.IO.TextWriter.Write
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(24,13): (24,29) error FABLE: Cannot resolve System.IO.TextWriter.Write
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(25,13): (25,24) error FABLE: Cannot resolve System.IO.TextWriter.Write
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(33,2): (33,16) error FABLE: Cannot resolve System.IO.TextWriter.Write
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(34,2): (34,16) error FABLE: Cannot resolve System.IO.TextWriter.Write
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(28,2): (28,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(37,19)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(30,4): (30,19) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(37,19)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(28,2): (28,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(38,21)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(30,4): (30,19) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(38,21)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(456,82): (456,96) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(468,36)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(469,33)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(460,2): (460,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(469,33)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(462,2): (462,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(469,33)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(470,16)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(460,2): (460,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(470,16)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(462,2): (462,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(470,16)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(471,23)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(460,2): (460,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(471,23)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(462,2): (462,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(471,23)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(472,19)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(460,2): (460,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(472,19)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(462,2): (462,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(472,19)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(473,16)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(460,2): (460,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(473,16)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(462,2): (462,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(473,16)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(456,82): (456,96) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(474,25)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(456,82): (456,96) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(475,27)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(476,13)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(460,2): (460,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(476,13)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(462,2): (462,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(476,13)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(456,82): (456,96) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(477,22)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(456,82): (456,96) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(478,22)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(456,82): (456,96) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(479,15)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(480,22)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(460,2): (460,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(480,22)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(462,2): (462,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(480,22)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(456,82): (456,96) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(481,19)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(456,82): (456,96) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(482,18)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(456,82): (456,96) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(483,17)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(484,21)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(460,2): (460,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(484,21)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(462,2): (462,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(484,21)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(485,21)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(460,2): (460,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(485,21)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(462,2): (462,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(485,21)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(486,17)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(460,2): (460,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(486,17)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(462,2): (462,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(486,17)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(487,19)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(460,2): (460,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(487,19)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(462,2): (462,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(487,19)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(488,17)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(460,2): (460,18) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(488,17)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(462,2): (462,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(488,17)
C:/Temp/GetDark/.fable/Fable.React.5.0.0-alpha-002/Fable.Helpers.ReactServer.fs(459,2): (459,16) error FABLE: Cannot resolve System.IO.TextWriter.Write - Inline call from .(489,19)

Hmm, also the same problem with 4.1.3

@nojaf
Copy link
Member Author

nojaf commented Nov 16, 2018

This is probably related to the fact that I'm using fable-splitter withallFiles: true.
I believe it tries to compile all files in Fable.React to my output folder.
Should the Fable.Helper.ReactServer.fs be wrapped with a #if !Fable directive @alfonsogarciacaro?

@alfonsogarciacaro
Copy link
Member

Yes, that should be the easiest solution, would you mind to PR it? I'm concerned we're having many #if directives in the code. Probably it would be better to do like Thoth.Json does and keep two different projects for each platform. But for that we would need a comprehensive test suite to make sure the API is consistent.

@nojaf
Copy link
Member Author

nojaf commented Nov 16, 2018

Happy to do PR. Maybe there is an other solution, is fable using the fsproj file inside the .fable folder?
I'm trying to disable to compile tag with
<Compile Include="Fable.Helpers.ReactServer.fs" Condition="$(FABLE_COMPILER) == 'false'" />.

This doesn't work but I'm not sure that fable looks at the proj file?
Also not sure if what variables are available in msbuild.

@alfonsogarciacaro
Copy link
Member

Fable does indeed look at the project file (this is necessary to get the file order) but for .fsproj coming from Nuget packages, it just does a very simplistic resolution that doesn't check conditional. But anyways #124 should solve the problem, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants