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

Compact license header #1771

Closed
wants to merge 1 commit into from
Closed

Compact license header #1771

wants to merge 1 commit into from

Conversation

paulirish
Copy link
Member

This is motivated by wanting fewer than 16 lines of boilerplate at the top of every source file. :)

I have reviewed all internal licensing requirements (go/releasing/preparing) and this is the best we can do. The Golang project (and many projects in Go) use a very compact header. (example) however while this shortform boilerplate is permitted for BSD and MIT, Apache requires all the text.

So essentially, we nuke all the newlines. :)
And we drop from 16 total lines down to 5. 📉 sgtm!

As a start, this PR just changs a single source file header. If it's sgtm, then I will update all files.

@patrickhulce
Copy link
Collaborator

Apache requires all the text.

:( I don't have strong feelings. I don't like many lines, but I've started to ignore it and I also don't like really long lines, haha.

@ebidel
Copy link
Contributor

ebidel commented Feb 25, 2017

Is the goal to make the build smaller? Personally, I'd prefer keeping the full boilerplate in source and removing/re-adding at build time. We can use the gulp-license with tiny: false to re-add it to the bundle.

It's also worth noting the Polymer teams gets away with a minimal header and links to the full license (example). WDYT of that?

@tjsavage how was that done?

@paulirish
Copy link
Member Author

Is the goal to make the build smaller?

nah that's not what i was targeting. (sorry for not being clear on that!)

its to improve the developer story. less scrolling. higher signal:noise ratio of the sourcebase. since our implementations will be increasingly reviewed by folks (who aren't contributing), it'd be nice to improve the visual accessibility of the code.

gulp-license

Also from my research on this topic it looks like we probably shouldn't be using tiny:true in the built version. :/ Though TBH I didn't find any specific conversations of deployed JS code, as the constraints there are slightly different.

Polymer teams gets away with a minimal header

Yeah projects licensed under BSD and MIT (polymer is bsd) can get away with the shortform: https://goto.google.com/ooiik (internal link)
And someone asked specifically for a more shortform for Apache but the guidance was to go long: https://goto.google.com/gxiub (internal). (That form would have def been ideal for me, but oh well. :/ )

@brendankenny
Copy link
Member

I breeze right over the license header as well, so it doesn't bother me. I've never really heard of anyone complaining about it before, actually :)

I will say that often when I look at other people's source code just the shape of the license header is a good first check of what license they're using, so it is a shame to lose that Apache 2.0 shape.

@wardpeet
Copy link
Collaborator

I don't have any issues with the large license either. More scrolling is extra exercise 💪

@paulirish paulirish closed this Mar 25, 2017
@paulirish paulirish deleted the sm-license-header branch March 25, 2017 00:47
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.

5 participants