Skip to content

remove useless private api - #4654

Merged
pangratz merged 1 commit into
warp-drive-data:masterfrom
sly7-7:simplify-serialize-entry-points
Nov 18, 2016
Merged

remove useless private api#4654
pangratz merged 1 commit into
warp-drive-data:masterfrom
sly7-7:simplify-serialize-entry-points

Conversation

@sly7-7

@sly7-7 sly7-7 commented Nov 15, 2016

Copy link
Copy Markdown
Contributor

This follows #4637
cc @bmac

@private
@param {DS.Model} record the record to serialize
@param {Object} options an options hash
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@sly7-7 do you mind deprecating this instead of removing it? Just in case someone was using it.

@pangratz

pangratz commented Nov 17, 2016

Copy link
Copy Markdown
Contributor

Since this is a public facing change, I think this should be put behind a feature flag 🤔

@sly7-7 can you update this PR to also include a test for the deprecation? Merci beaucoup!

@sly7-7

sly7-7 commented Nov 18, 2016

Copy link
Copy Markdown
Contributor Author

@pangratz unless I'm missing something, this method is marked @private, so there is no need to feature flag. I will add the test 😄 , I was too lazy to add one, considering the nature of the change.

@pangratz

Copy link
Copy Markdown
Contributor

Basically you're right. But since we're introducing a public facing deprecation, I think it would be good to put this behind a feature flag. If we - despite being private - see that too many applications use this in the wild, we can simply disable the feature.

I think the goal is to use feature flags for all public facing changes, even if they are very small.

@sly7-7

sly7-7 commented Nov 18, 2016

Copy link
Copy Markdown
Contributor Author

feature flag and test added 😄

Comment thread addon/-private/system/store.js Outdated
*/
serialize(record, options) {
if (isEnabled('ds-deprecate-store-serialize')) {
deprecate('Use of serialize is deprecated, use record.serialize instead.', false, {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we be more explicit here and use Use of store.serialize is deprecated, use ... instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

no pb 😄

Comment thread FEATURES.md Outdated
```
- `ds-deprecate-store-serialize` [#4654](https://github.com/emberjs/data/pull/4654)

Adds a deprecation warning when using Store#serialize method

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's also add a short sentence on what should be used instead. Just so people looking at the FEATURES.md immediately know what this is about.

@pangratz pangratz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, thanks @sly7-7 for the quick response! Just one more tiny nitpick, then prefixing this commit with [FEATURE ds-deprecate-store-serialize] and this is ready to go 🚀

@sly7-7

sly7-7 commented Nov 18, 2016

Copy link
Copy Markdown
Contributor Author

@pangratz I'm a little bit 😞 this takes so much reviews. I hope this is ok now 😄

@pangratz
pangratz merged commit ef34f66 into warp-drive-data:master Nov 18, 2016
@pangratz

Copy link
Copy Markdown
Contributor

🎉

@sly7-7
sly7-7 deleted the simplify-serialize-entry-points branch November 18, 2016 13:37
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.

4 participants