#Hey dotnet daggernauts. I wrote the SDK
1 messages ยท Page 1 of 1 (latest)
I've made an effort to keep performance optimization in mind throughout development (it's hard for me not to, as I focus a lot on low-level optimization for embedded platforms at work). Right now everything is at least as fast as the Go SDK, with code generation being 3x as fast as Go (on my laptop, YMMV).
Features that I cared about particularly:
- Immutable & IEnumerable suport. Dagger array params always take IEnumerable, so you don't have to do
.ToList()or.ToArray()off of LINQ compositions. Which, by the way, Dagger and LINQ go together like peanut butter and jelly. - Native nullability integration. Optional parameters are optional parameters. They aren't passed via a separate struct, as in the other SDKs. Why do
WithDirectory(..., new(){ Owner = "foo" })when you can doWithDirectory(..., owner: "foo")? - Task suport. Your module functions can return
TaskandTask<Foo>, and can accept task parameters. Module objects can haveTask<Foo>fields even. - No attributes required. We already have
publicvsinternal. Allpublicmembers of a module are introspected. An optional attribute is used for specifying default path and ignores for directory parameters (and it supports setting a default for the whole assembly or a whole object, no need to reiterate the path and ignores per every function as in other SDKs).
Work yet to do includes
- Enums
- Interfaces
- Controls for logging verbosity
- Suport compiling projects inside of the module runtime. Right now it expects them to have been pre-compiled.
- Support generating and updating the csproj file.
- Work out kinks and edge-cases
- Build targets that use MSBuild features to make it super easy one-click to run and debug in dagger from host IDE
cc @red adder @night wind @winged field
If any of you have a chance to read my implementation details, don't hesitate to ask questions or suggest feedback.
๐ Thanks for posting the progress. @winged field and I are working on dotnet implementation on https://github.com/dagger/dagger/tree/main/sdk/dotnet. I'm glad if we could discuss and work together to make the community SDK better.
@red adder i need to leave for an appointment but i did something i didnt want to... https://github.com/dagger/dagger/pull/9288/commits/13b2cde5f6eb0cfb62e8111127c49392648b1a36 ๐ญ
i really need to make auto signing happen, its annoying
Hi @red adder, agreed. It will be interesting to see what collaborating looks like. Frankly, I wish you guys had looked at my implementation from last year. You would have found for example that I already did the Roslyn syntax tree approach that Patrick is recently experimenting with. My work is much further along in functionality and in a different direction in many ways, so it's not obvious how to reconcile. Do we swap to mine as a base, or PR my improvements in piece by piece. I'm sure you don't want to get used to a new base as much as I don't want to bother with reconciling. I'll present a tour of my code over the next few days and I hope the quality speaks for itself and wins you over. I'll also continue looking through what you've done for anything that I'm lacking. For example, I see you guys have a more robust set of error codes, and support for more versions of dotnet.
we all want the same thing at the end of the day. and it certainly doesn't make sense to diverge. maybe a little demo between us to see where we are at?
That's the idea. I'll post a bit of a demo tonight. If you would like to do a call, I'm available outside of 9-5 Pacific time (yes it's past 9 now, I'm getting a late start on my workday).
I think all 3 of us are on completely different timezones entirely ๐
I'm available before 9 because 9 is midnight on my time zone. ๐ญ
Hi friends, did you get a chance to talk and find a way to collaborate? โค๏ธ
Hey solomon, not yet ๐ฆ Theres one PR open which Ive added a few improvements to the one we merged a while back. Probably we should merge and close that off (even if we dont use all of it)