-
Notifications
You must be signed in to change notification settings - Fork 35
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
Rendering support for explicit slandles #3340
Rendering support for explicit slandles #3340
Conversation
f2f8301
to
60341f6
Compare
src/runtime/recipe/handle.ts
Outdated
return slandle; | ||
} | ||
|
||
_copyInto(recipe: Recipe, _cloneMap: CloneMap, variableMap: VariableMap) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why add _
prefix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_copyInfo needs the prefix to match the rest of the code base, I would like to remove this at some point.
The _ for the arguments has been discussed elsewhere (tslint complains) but I will stop listening to it about this.
|
||
export class ResolveWalker extends RecipeWalker { | ||
options: IsValidOptions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make it private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I'd prefer to pass the options around explicitly, but the RecipeWalker & Walker classes don't currently support that. Should I keep track of this or file a bug?
options.errors.set(this.name, label); | ||
} | ||
if (options && options.details) { | ||
options.details = label; // TODO use .errors instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO(jopra) or remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had left this off as I do not believe that this is the responsibility of any one engineer. I think we all will benefit from being consistent in the way that we record errors. Will add it so that someone is tracking it (me).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you knew beforehand that you need better typing, it would be worthwhile to separate changes that are no-op (e.g. adding types) from the meat of this change that actually does what you describe in the change name (i.e. hiding slot connections behind methods, so that you can start implementing slandels interop - if I understand correctly). It would make an easier review if all changes were directly contributing to making slandels work.
In the past I've been told that fixing things as we notice them is desired in Arcs (as opposed to other projects where separating the concerns of commits is required). |
Separation of patches is interesting. On one hand it would be a pain if re-organising a change into multiple PRs took a lot of time, so if it is painful it's ok to send a PR with unrelated changes. On the other hand if you can relatively effortlessly split a change into logical steps that are naturally stacked on top of each other, it is usually a good idea I would say. The big if in there is (A) whether there is a logical way to split change into pieces and (B) whether it can be done and you have the tooling/workflow to allow you to do that. FWIW I use meld for visually selecting blocks of code that I pull in into a new branch when I do splitting. You can ask around how others do that. |
ee71097
to
87f8d59
Compare
87f8d59
to
d8419e8
Compare
This should enable the the stardate and favorite foods slandles demos to work.
Can be tested with
sigh devServer
and the following urls:http://localhost:8786/shells/dev-shell/?m=https://$arcs/particles/Profile/SLANDLESFavoriteFood.recipes
http://localhost:8786/shells/dev-shell/?m=https://$arcs/particles/Stardate/SLANDLESStardate.recipes