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

Is it possible to use PolySharp on a github Ubuntu Runner ? #94

Open
valadas opened this issue Dec 31, 2023 · 7 comments
Open

Is it possible to use PolySharp on a github Ubuntu Runner ? #94

valadas opened this issue Dec 31, 2023 · 7 comments

Comments

@valadas
Copy link

valadas commented Dec 31, 2023

Basically, I just started using PolySharp on a project and find it amazing. Now that project repository is setup to build on Ubuntu runners on github actions and I am getting this error:

     /home/runner/.nuget/packages/polysharp/1.14.1/buildTransitive/PolySharp.targets(45,5): error POLYSPCFG0001: The PolySharp source generators have been disabled on the current configuration, as they need Roslyn 4.3 in order to work. PolySharp requires the source generators to run in order to generate polyfills, so the library cannot be used without a more up to date IDE (eg. VS 2022 17.3 or greater) or .NET SDK version (.NET 6.0.400 SDK or greater). [/home/runner/work/some-module/some-module/Module.csproj]

The build process uses .Net 7 but the actual built project is .Net Framework.

Is there thing I could try to fix that or is this scenario just not a supported one ?

@YoshiRulz
Copy link

YoshiRulz commented Jan 9, 2024

Are you sure it's configured to use version 7.x.x of the .NET SDK?
For reference, the error is bespoke and comes from here.


at maintainers: Is it necessary to manually check Roslyn's version? IIRC if you compile against a certain version of Microsoft.CodeAnalysis.Analyzers, trying to use an older SDK will result in the Source Generator failing to load. Nevermind, I kept reading:

If the source generators are disabled, also emit an error. This would've been produced by MSBuild itself as well, but
emitting this manually lets us customize the message to inform developers as to why exactly the generators have been
disabled, and that PolySharp will not work at all unless a more up to date IDE or compiler version are used.

@valadas
Copy link
Author

valadas commented Jan 9, 2024

Sooo it means it would not work without Visual Studio, so should work on a windows runner but not ubuntu right ?

@YoshiRulz
Copy link

I didn't say that. Roslyn is cross-platform.

@valadas
Copy link
Author

valadas commented Jan 10, 2024

Are you aware of any usage in a ubuntu pipeline ? If it could be a bug, I am happy to create a public repo with minimal reproduction scenario...

@sungam3r
Copy link

It definitely works on both windows and Linux.

@valadas
Copy link
Author

valadas commented Jan 10, 2024

Thanks @sungam3r I'll dig further here mainly wanted to figure out if it was pursuing or if it was just not supported. I'll try to create a minimal repo to reproduce the issue and try to figure out what I am doing differently.

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

3 participants