Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Skip license processing for top-level source directories that are unchanged #3437

Merged
merged 1 commit into from
Mar 1, 2017

Conversation

jason-simmons
Copy link
Member

@jason-simmons
Copy link
Member Author

@Hixie

@eseidelGoogle
Copy link
Contributor

Curious how big a win this is? :)

@jason-simmons
Copy link
Member Author

For typical changes that only affect files in the flutter/ tree and do not change dart/third_party/etc,
this can sidestep ~97% of the processing work.

Copy link
Member

@chinmaygarde chinmaygarde 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 to me. I'd understand if you want to wait for a review from a Dart native though.

..addOption('src', help: 'The root of the engine source')
..addOption('out', help: 'The directory where output is written')
..addOption('golden', help: 'The directory containing golden results')
..addFlag('release', help: 'Print output in the format used for product releases');
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for these flags. It makes the usage so much clearer.


Stream<List<int>> _signatureStream(List files) async* {
for (RepositoryLicensedFile file in files) {
yield file.io.fullName.codeUnits;
Copy link
Member

Choose a reason for hiding this comment

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

Is this really necessary? I am slightly worried about case sensitivity of the file system returning different results per platform. You're comparing the file contents anyway which should catch all cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is intended to catch renaming of files (which will affect the file paths listed in the output)

Copy link
Member

Choose a reason for hiding this comment

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

Oh. Good point. I forget the file names were also present in that list.

@Hixie
Copy link
Contributor

Hixie commented Feb 24, 2017

Travis didn't run it?

The code LGTM but I'd like to see Travis run it first. :-)

@jason-simmons jason-simmons force-pushed the license_hash branch 5 times, most recently from 39a44e4 to 257787b Compare February 24, 2017 19:08
@jason-simmons
Copy link
Member Author

Travis is passing now.

Also modified the script to always run the full license check on the flutter tree. The goal is to avoid requiring updates to the golden signature on flutter code changes that don't affect the license output.

@jason-simmons jason-simmons merged commit 4946d44 into flutter:master Mar 1, 2017
goderbauer pushed a commit to goderbauer/engine that referenced this pull request Mar 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants