Repository navigation
Conversation
|
Personal preference would be for: Understood that this is more of a mouthful than just Either way, |
|
This would not work. What is needed is a standard path which users can use to place annotations. In your example `dagger.#run` is not an annotation path, but a reference to the (unique) reference #run in side the package `dagger`. It is not a valid replacement for `#dagger.compute`.
However `#dagger.run` would be a valid replacement, if that is what you meant?
… On Feb 12, 2021, at 15:41, dubo-dubon-duponey ***@***.***> wrote:
Personal preference would be for:
import (
"dagger.cloud/dagger"
)
dagger.#run
Understood that this is more of a mouthful than just #run - on the other hand it makes it seem less "black magic", it points to the package it's "coming from", alongside the other definitions, and feels a bit easier to reason about.
Either way, #run is definitely better than the current #dagger.compute, that's for sure. :-)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
Ok.
I do not understand what that means ^. The point I was trying to make (very badly) above was that: It feels a little bit weird to have part of dagger SDK being imported with the natural cue mechanism, under their own namespace ( (and understood that under the hood #dagger.compute is substantially different from dagger.#Exec - but still, it feels weird :-)) |
|
I don’t have a good response to the fact that this is confusing... But I don’t think there’s anything we can do anything about this one, because “#dagger.compute” is like a user-specified callback. Other than tell you what callback name to use, there’s nothing we can give you to import.
… On Feb 12, 2021, at 6:53 PM, dubo-dubon-duponey ***@***.***> wrote:
Ok.
"What is needed is a standard path which users can use to place annotations."
I do not understand what that means ^.
The point I was trying to make (very badly) above was that:
It feels a little bit weird to have part of dagger SDK being imported with the natural cue mechanism, under their own namespace (import, then call dagger.#Bla), while some other parts (#dagger.compute) are just there, magically, in the global namespace.
(and understood that under the hood #dagger.compute is substantially different from dagger.#Exec - but still, it feels weird :-))
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
A possible alternative is to use |
Perhaps something along the lines of:
That way we keep it consistent: imports all the way, everything uses the SDK, no magic markers |
ff9d127 to
67f0c9b
Compare
|
Update: I have rebased the PR, and made an important change: I am now proposing The advantages I ses for |
Signed-off-by: Solomon Hykes <[email protected]>
Summary
This pull request changes the path to use when attaching a compute pipeline to a configuration value.
#dagger.compute#computeRationale
It has come up a few times that
#dagger: computeis not ideal as a path for attaching compute pipelines to config values.Among other issues:
#and a key without; potentially confusing users and causing frustrating typos (eg.dagger: #compute)daggerwhich contains definitions. So users will see this:This further increases confusion between “pound” and “no pound”.
Possible alternatives
Several alternatives have been discussed:
#compute(this proposal)#run(my previous favorite, but I now think #compute is better)#apply#onChange#onchangeThank you @dubo-dubon-duponey and @tiborvass for their feedback.