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

Improve source generator UX by fishing for dependencies #72980

Closed
AdmiralSnyder opened this issue Apr 11, 2024 · 1 comment
Closed

Improve source generator UX by fishing for dependencies #72980

AdmiralSnyder opened this issue Apr 11, 2024 · 1 comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@AdmiralSnyder
Copy link
Contributor

Hello, currently, source generators can only have dependencies if they are packaged into a nuget packages. this is cumbersome UX for usecases where you write one-off source generators for yourself, for example.

i'm thinking about improving the ux for source generators by enabling easier handling of referenced dlls, especially for generators using ProjectReferences for their refs.
if we would extend the behaviour of ShadowCopyAnalyzerAssemblyLoader to inspect the deps.json of the generators and copy those files, too... would that be PRable?

@jaredpar Fred suggested to ping you :-P
other pings: @PaulBraetz @viceroypenguin

P.S.: I read through dotnet/sdk#17775 but don't think the recommendations there apply :-(

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 11, 2024
@jaredpar
Copy link
Member

I do not believe this is a viable path forward because it violates determinism in the compiler. Specifically that all inputs to the compiler, including analyzers need to appear on the command line. In the case that is done the compiler will laod them and there shouldn't be a need for looking through deps.json.

@jaredpar jaredpar closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants