sbt-typelevel icon indicating copy to clipboard operation
sbt-typelevel copied to clipboard

SPDX headers?

Open rossabaker opened this issue 3 years ago • 7 comments

I have swallowed a bunch of defaults I don't like in the interest of comity, but https://github.com/typelevel/jawn/pull/402 has me wondering about whether this is our opportunity to wave the flag for SPDX. It accomplishes the same, is more terse, and is machine readable. SPDX is good.

rossabaker avatar Jan 17 '22 02:01 rossabaker

We should crap or get off the pot on this one before we migrate too many more projects.

rossabaker avatar Jan 18 '22 05:01 rossabaker

I would merge a PR that makes this change 👍

With that said, once we have a prePR command and we teach Scala Steward to run it for us, we should be able to make changes like this and propagate them without manual intervention. See also:

  • https://github.com/scala-steward-org/scala-steward/pull/2308

armanbilge avatar Jan 18 '22 09:01 armanbilge

I'm less worried about being able to do it and more worried about defaults churn now that this has been rolled out to more than a couple obscure repositories.

rossabaker avatar Jan 18 '22 13:01 rossabaker

Fair enough. But it would already be a sort of defaults churn since for most/all repos the de-facto default seems to be non-SPDX headers.

armanbilge avatar Jan 18 '22 13:01 armanbilge

Yeah, that's a fair point. I was focued on the repos that have no headers.

There should be a high bar to changing defaults, and this appears to be one that only I care about.

rossabaker avatar Jan 18 '22 18:01 rossabaker

I had a quick look at this one and it seems like it could be awkward as I don't think sbt-header will regenerate existing headers into the new style in headerCreate, but it will complain about them using the wrong style for headerCheck.

All I did to test this was to add the headerLicenseStyle to the projectSettings of TypelevelPlugin in sbt-typelevel, so it might be that more configuration was needed.

DavidGregory084 avatar Jun 14 '22 14:06 DavidGregory084

This is when http4s migrated from SPDX to the default: https://github.com/Banno/mobile-data-services/pull/8954. I wish I remembered whether that regeneration commit just worked or if I did black sed magic to strip the original header before recreating. 🤔

rossabaker avatar Jun 14 '22 16:06 rossabaker