- 
                Notifications
    You must be signed in to change notification settings 
- Fork 311
Fix #2521: Enable TreatWarningsAsErrors (breaking?) #2527
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
base: fable3
Are you sure you want to change the base?
Conversation
| Is it possible to attach the project where a file came from, when we collect all the files? And can we pass this information to the compiler here: https://github.com/fable-compiler/Fable/blob/main/src/Fable.Cli/Main.fs#L507 Then we could compile each file with the options from the respective project, I imagine. | 
| Not sure if that will work. That "compiler" is the fable compiler which indeed compiles file one by one, but most errors come from the F# compiler and this compiles all files at once so we cannot use different options: Line 351 in 4d9172e 
 | 
| Another thing we could try and I've been considering for a while is first compiling the sources of the packages and later the user sources referencing the .dlls. This would allow us to use different F# compilation options for the packages ( 
 I remember also @dbrattli needs to compile packages in a different way for Python, so this could also help him. | 
| 
 Got it. I guess I should get familiar with how the all of this is set up 😅 Re:  | 
| TBH, I'm not entirely sure, but I assume the F# compiler inlines directly the IL code from the .dll assemblies. To my knowledge there's no way to get the typed AST that Fable needs for compilation from a .dll, only from source files. Actually inlining is not done in the typed AST, that's why Fable needs to do it by itself. 
 
 | 
| Actually, the last comment gave me an idea, but it's a long shot. We could ask library authors to use  | 
bd63a98    to
    1895f4d      
    Compare
  
    1527047    to
    a69e20d      
    Compare
  
    87e6a8c    to
    b627427      
    Compare
  
    
See #2521 (comment)