Skip to content

Split FileWriter.writeBytes out from FileWriter.write #2627

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

Merged
merged 2 commits into from
Apr 28, 2021

Conversation

srawlins
Copy link
Member

The 5 callers of this method have a rather split set of arguments. writeBytes is the only method which needs allowOverwrite and write is the only method that needs element. The primary benefit here is to properly type content so that errors are known statically vs at runtime.

@google-cla google-cla bot added the cla: yes Google CLA check succeeded. label Apr 28, 2021
Copy link
Contributor

@jcollins-g jcollins-g left a comment

Choose a reason for hiding this comment

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

Nice cleanup!

}
_fileElementMap[outFile] = element;
Copy link
Contributor

Choose a reason for hiding this comment

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

i wonder if the test failures might be due to this being removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah ha, good catch!

@coveralls
Copy link

coveralls commented Apr 28, 2021

Coverage Status

Coverage increased (+0.1%) to 57.573% when pulling 381354f on srawlins:split-write into f9a875d on dart-lang:master.

@srawlins
Copy link
Member Author

CI is finally green.

@srawlins srawlins merged commit bf7eb56 into dart-lang:master Apr 28, 2021
@srawlins srawlins deleted the split-write branch April 28, 2021 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants