Open jasonmalinowski opened 7 years ago
(I could also imagine an argument that if you are doing [CallerFilePath] with things in %TEMP% you're already so off the rails that the compiler isn't remotely deterministic and we're actually making your life better...)
:memo: The primary goal of path mapping is to allow project maintainers to define a .editorconfig file that applies to an entire project. Since these maintainers do not have a way to force a user to place additional files in the parent directories of these linked locations, we need a way to "normalize" paths typically used for generated code such that the overall analyzer experience is consistent.
This is especially important for policy-enforcing situations like security or compatibility enforcement analyzers. It is not intended to have any impact for users who are not using .editorconfig. However, if we were to reuse the compiler's existing path mapping functionality (/pathmap
), there are known cases where a behavior change would be observable.
Sadly, this editorconfig work isn't going to fit for 15.3, but we're going to continue targeting the next foundation update.
Unfortunately not getting to this editorconfig work in 15.5, but we will target the next foundation update.
Any updates? This makes consuming source-only packages very difficult as the analyzers complain about the code that comes from the package. We are currently running into this on dotnet/templating repo with WcWidth.Sources package.
@jasonmalinowski what is left to do here? Can you close out, or assign to appropriate milestone s this gets done?
If a user drops an .editorconfig file in their project root, there is a general understanding that that should apply to all appropriate files in the project. This gets tricky for a few situations:
Our .editorconfig spec assumes that .editorconfig application is subject to the
/pathmap
flag, so if these directories are mapped "under" the project root then .editorconfig files would apply too, at least for analyzers that choose to run on generated code. But since/pathmap
impacts other very observable things, there are some questions we need answered:If "when" is "always" then it's potentially a breaking change.