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

CompileBefore/CompileAfter is lost due to the FSharpSourceCodeCompileOrder target #17786

Closed
auduchinok opened this issue Sep 25, 2024 · 3 comments · Fixed by #17791
Closed

CompileBefore/CompileAfter is lost due to the FSharpSourceCodeCompileOrder target #17786

auduchinok opened this issue Sep 25, 2024 · 3 comments · Fixed by #17791

Comments

@auduchinok
Copy link
Member

Hi,

We use the knowledge about CompileBefore and CompileAfter extensively in Rider. With the newer SDKs this data is lost because of the new way these files are passed to compiler. Files that were initially added as CompileBefore are now added to Compile item collection instead. Even though the final file order is correct, the info about the original item type is lost, which introduces regressions in our case.

Could we preserve this knowledge as metadata in the rewritten Compile items, please?

@vzarytovskii
Copy link
Member

#16771 was implemented in
#17103. <Compile> item has metadata about order:
image

@auduchinok
Copy link
Member Author

@vzarytovskii This only seem to apply to the items having the metadata before moving groups in FSharpSourceCodeCompileOrder target. Items originally added to CompileBefore group don't have this metadata and are silently added to Compile, so they lose the knowledge about the original item type. It's easy to see on AssemblyInfo.fs file in console template.

@KevinRansom
Copy link
Member

@auduchinok,
Hey, they weren't really supposed to be used for anything other than: Microsoft.FSharp.Targets build order. And the change to a metadata version was to address other SDK features that rely solely on compile order. I expect adding the metadata in the scenario it is currently lost is not that hard.

mfilippov pushed a commit to JetBrains/resharper-fsharp that referenced this issue Oct 8, 2024
The file is missing the CompileOrder metadata, making FCS complain about file order. See dotnet/fsharp#17786

(cherry picked from commit 6361b1a985a919a257cb25132f3045d339cdf650)

IJ-MR-145514

GitOrigin-RevId: 61870373db11528f1c4fdd9a4f3695b8d7ff985b
auduchinok added a commit to JetBrains/resharper-fsharp that referenced this issue Oct 8, 2024
The file is missing the CompileOrder metadata, making FCS complain about file order. See dotnet/fsharp#17786

(cherry picked from commit 6361b1a985a919a257cb25132f3045d339cdf650)

IJ-MR-145514

GitOrigin-RevId: 61870373db11528f1c4fdd9a4f3695b8d7ff985b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
3 participants