-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
CP dependency keys split on commas? #13217
Comments
"That function" being https://github.com/emberjs/ember.js/blob/v2.4.0/packages/ember-metal/lib/expand_properties.js#L48-L52 of course. 😓 |
Using brace expansion was a feature added sometime in 1.5ish timeframe.
It seems to me that that comma detection/handling is what is supporting this feature, am I missing something? |
I had no idea that was a feature.
|
I think the 1) is a great idea (there are two forEach's in that file that can be removed). I think we are pretty fond of the feature in general, so I think 2) is kinda out, but expanding at build time seems possible. |
Interesting. I too was not aware of this feature. Do you know if/where it's documented? Might we want to only split on commas that are inside curly braces? That is Also, I can put together a PR for 1). A question that comes to mind is, would |
If we do remove this, it'd be helpful to know over on the guides as well, as we just merged a PR to put it into the guides ;-) See emberjs/guides#1348 for more detail (and a link back to the original blog post where it was introduced) |
|
@stefanpenner that was the original idea, but if you define a lot of classes design time starts being an issue for cold boot. Last time I was in this code it seemed like there was a lot of cleanup that could be done. @nickiaconis did you actually notice a particular issue with this? In quite a few cases simple closures in forEach inline. |
To direct the energy someone that will absolutely yield a big win (and fix some bugs we have a hard time fixing without perf issues). Pre compiling mixins (all arguments to extend) to prevent the need for mixing merging needing to detect each member, would be rad. |
@acorncom Fantastic! Is anyone working on getting this into the API docs as well? @stefanpenner It would appear this has already been migrated to for loops. @krisselden There is a bug with the logic behind this. It splits on all commas, even those that are not part of a brace expansion. I'm working on a fix, but there are different ways to take it depending on whether nested brace expansions are supported or not. Should they be? expandProperties('foo.{bar.{fiz,baz},[]}', console.log) //=> 'foo.bar.fiz', 'foo.bar.baz', 'foo.[]' |
@krisselden I would love to see cases where forEach in lines. Or do you just mean the captured context is dropped and don't itself cost |
@nickiaconis Nice initiative on working on a feature. I'm curious about using the RFC process. That may help with getting the feature vetted as well as provide background for documentation for the guides/api docs, see CONTRIBUTING.md#requesting-a-feature which recommends creating an RFC Issue to request a feature/enhancement (no need for a PR with RFC, only an issue in the repo) |
@pixelhandler This feature already exists and is not well documented. There are also bugs in the feature, but because it isn't documented nobody is sure how it should be implemented. @stefanpenner @krisselden @rwjblue Can somebody make an executive decision on the full microsyntax for brace expansion that is 100% backwards compatible with the current broken implementation? |
@nathanhammond - I do not understand your comment, @nickiaconis submitted #13231 to address this issue and I believe that we are all on the same page over there (though there is still some cleanup that he was working on). |
Actually, I'm going to close this in favor of the #13231 (to keep further conversation together.... |
@rwjblue I was clarifying that this was a bug fix, not a feature request. That is all. |
Is this a thing we (I?) can deprecate? It would be nice to remove the extra loop from that function, and it would also open up the ability to use key names with commas (this bit me recently). I don't think this functionality is documented in the guides/api, but I didn't look super closely.
The text was updated successfully, but these errors were encountered: