Comments (4)
I tried to track down the problem by debugging into Cake.
The issue seems to be in ParameterEmitter.
It writes out all of the method parameter's attributes into the generated Cake script, including System.Runtime.CompilerServices.NullableAttribute
.
But the nullable attribute is a little special, since it does not seem to exist in the BCL but instead the C# compiler generates it into the addin assembly as internal
class.
This attribute is thus not visible to the generated Cake script, causing the compilation error.
I could see multiple ways to fix this
- Add special handling for the
Nullable
attribute and simply ignore it when generating the alias method - Add special handling for the
Nullable
attribute and emit the proper nullability annotations in the generated script- This emits a warning though (usage of nullability annoations when nullable is not enabled)
- Ignore all internal attributes (this might avoid similar problems in the future, but I'm not sure if this causes other issues)
I hope this information is helpful.
I'd be happy in assisting with a bugfix and provide a PR once I know what the fix should look like
from cake.
Ideally the proxy methods generated would have the same signature as the original addin extension method with the exception of the context being supplied.
The warnings could once be pragma disabled and enabled before and after method generation.
from cake.
Ideally the proxy methods generated would have the same signature as the original addin extension method with the exception of the context being supplied.
The warnings could once be pragma disabled and enabled before and after method generation.
Okay, so that would point to special-casing the "Nullable" attribute and emitting a ?
in the proper places.
I'll see what I can come up with.
from cake.
🎉 This issue has been resolved in version v4.0.0 🎉
The release is available on:
Your GitReleaseManager bot 📦🚀
from cake.
Related Issues (20)
- Update Spectre.Console to 0.48.0
- Add DotNetAddReference alias for dotnet add reference command HOT 1
- DotNetToolRunner doesn't support empty space at tool path
- Cake 4.0.0 not respecting .NET global.json version pinning when calling referenced tool HOT 3
- Bug with InspectCodeSettings parsing in InspectCodeRunner on Linux (and probably MacOS)
- Cake.Build doesn't generate description for nuget and non-sdk projecs HOT 1
- MSBuild properties are incorrectly formatted HOT 2
- SignTool error when /fd parameter is not provided
- Update NuGet.Packaging to 6.8.1 HOT 1
- Update NuGet.* to 6.9.1
- Update xunit to 2.7.0
- Update Verify.Xunit to 23.5.2
- Update Microsoft.NET.Test.Sdk to 17.9.0
- Update Basic.Reference.Assemblies.* to 1.5.0
- Update Microsoft.CodeAnalysis.CSharp.Scripting to 4.9.2
- Update Autofac to 8.0.0
- Github action with sparse checkout causes cake Gitversion to crash
- Cake.Tool not working on FreeBSD HOT 1
- `InspectCode` calls the exe file even on Linux, where it doesn't work HOT 1
- Unhandled exception: System.IO.IOException: Access to the path '...\build\tools\.store\.stage\ftb2snwd.f5x' is denied. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cake.