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

Does the SDK discriminate between debug/release mode? Does it matter? #68

Open
cmeeren opened this issue Apr 9, 2023 · 1 comment
Open

Comments

@cmeeren
Copy link
Contributor

cmeeren commented Apr 9, 2023

While working on an analyzer that uses the TAST, it occurred to me that maybe the TAST could be different in debug/release mode (e.g. due to optimizations). Is this the case? If so, how can I test my analyzer in debug vs. release mode, and what determines which mode FSharp.Analyzers.SDK uses?

@baronfel
Copy link
Collaborator

In an editor, which 'mode' is going to be determined by the 'Configuration' chosen by the user. In any FSAC-based editor, that configuration will always be Debug, but Rider/VS/etc have more sophistication here.

In the CLI, that is determined by the Configuration MSBuild property. The Analyzer CLI doesn't have a -p flag to set properties (probably a good idea to add this) but MSBuild will gladly read properties from the environment and so if a user set Configuration=Release in their environment before calling the CLI then that's what the Configuration would be.

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

No branches or pull requests

2 participants