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

Rendering support for explicit slandles #3340

Merged
merged 7 commits into from
Jul 25, 2019

Conversation

Cypher1
Copy link
Contributor

@Cypher1 Cypher1 commented Jul 17, 2019

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

@Cypher1 Cypher1 requested review from shans and piotrswigon July 17, 2019 02:01
@Cypher1 Cypher1 force-pushed the runtimeRecipeAPISlotviews branch from f2f8301 to 60341f6 Compare July 17, 2019 02:05
return slandle;
}

_copyInto(recipe: Recipe, _cloneMap: CloneMap, variableMap: VariableMap) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why add _ prefix?

Copy link
Contributor Author

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;
Copy link
Collaborator

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?

Copy link
Contributor Author

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO(jopra) or remove

Copy link
Contributor Author

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).

Copy link
Collaborator

@piotrswigon piotrswigon left a 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.

@Cypher1
Copy link
Contributor Author

Cypher1 commented Jul 19, 2019

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).
I'll try to find a better separation in future and will ask about better workflows for this.

@piotrswigon
Copy link
Collaborator

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.

@Cypher1 Cypher1 force-pushed the runtimeRecipeAPISlotviews branch 2 times, most recently from ee71097 to 87f8d59 Compare July 25, 2019 03:26
@Cypher1 Cypher1 force-pushed the runtimeRecipeAPISlotviews branch from 87f8d59 to d8419e8 Compare July 25, 2019 04:36
@Cypher1 Cypher1 merged commit 582db97 into PolymerLabs:master Jul 25, 2019
@Cypher1 Cypher1 deleted the runtimeRecipeAPISlotviews branch July 25, 2019 04:44
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

Successfully merging this pull request may close these issues.

2 participants