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

Tweak syntax in rollup build script #9852

Merged
merged 2 commits into from
Jun 6, 2017
Merged

Conversation

flarnie
Copy link
Contributor

@flarnie flarnie commented Jun 5, 2017

@bvaughn and I already discussed this.

test plan:
yarn build

headerSanityCheck,
}) {
/**
* @param configs {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm okay with this but we generally are bad at maintaining JSDocs. They always eventually get out of sync with the code.

Maybe we could use Flow here instead?

Copy link
Collaborator

@gaearon gaearon Jun 5, 2017

Choose a reason for hiding this comment

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

I'm also curious about the motivation — is it because the code is hard to read? Or it doesn't run in some Node version? It it's about the declaration feeling crowded, maybe we could keep the destructuring but move it into a first statement. I'm just hesitant to add comments that aren't checked by a tool, and pretty much repeat the code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or it doesn't run in some Node version?

This was the reason.

I'm just hesitant to add comments that aren't checked by a tool, and pretty much repeat the code.

Agreed that comments are kind of no-value-add here. They're a bit of extra maintenance burden but otherwise you might as well just scan below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good - will remove the comments.

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

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

Looks good but let's remove the JSDoc.

@bvaughn and I already discussed this.

**test plan:**
`yarn build`
**what is the change?:**
removing some comments

**why make this change?:**
The code is basically self explanatory and these comments could get out
of sync.

**test plan:**
Visual inspection, `yarn build` and `yarn test`

**issue:**
facebook#9398
@flarnie
Copy link
Contributor Author

flarnie commented Jun 5, 2017

Tests are passing for me locally - I rebased, hopefully they will pass in CI. 🤞

@bvaughn
Copy link
Contributor

bvaughn commented Jun 6, 2017

Looks like CI's happy now too

@flarnie flarnie merged commit 30e6c6c into facebook:master Jun 6, 2017
@flarnie flarnie deleted the fixBuildScript branch May 25, 2018 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants