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

Apply standard Apache Header for new files #474

Merged

Conversation

mdedetrich
Copy link
Contributor

@mdedetrich mdedetrich commented Jul 7, 2023

Currently if you create a new source file (typically the case if you add new functionality into Pekko) it applies this header

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * license agreements; and to You under the Apache License, version 2.0:
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * This file is part of the Apache Pekko project, which was derived from Akka.
 */

which is not the header that should be applied (this header should only be on source files originally derived from Akka), instead you should rather be applying the standard Apache Header

/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Note that the functionality of adding our bespoke "Apache from Akka source" header if it detects a Lightbend/EPFL header by itself still applies (you can verify this locally by opening an existing source file, removing the "Apache from Akka source" and then running sbt headerCreateAll).

The PR also has a second commit which fixes the headers for new sources that was added which should be using the standard Apache header. git whatchanged --diff-filter=A was used to determine new relevant sources (the command goes through git history only listing new files).

@mdedetrich mdedetrich force-pushed the apply-normal-apache-header-new-files branch 3 times, most recently from 4103278 to c48b76f Compare July 7, 2023 07:19
@mdedetrich mdedetrich force-pushed the apply-normal-apache-header-new-files branch from c48b76f to 007e064 Compare July 7, 2023 07:20
Copy link
Contributor

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

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

Can we delay merging this? If the RC3 passes, we may not want to change license headers on any existing files.

@mdedetrich
Copy link
Contributor Author

mdedetrich commented Jul 7, 2023

Can we delay merging this? If the RC3 passes, we may not want to change license headers on any existing files.

@pjfanning Sure, are you happy with the implementation though? (I want to apply the same changes to other Pekko modules).

I would prefer for this to land for 1.0.0 if RC3 passes but only if its possible without cancelling the vote.

@pjfanning
Copy link
Contributor

the impl is fine - if copying to other pekko repos, we might not want to change any files copied from this repo to those other repos in the past (like the AddMetaInfLicense scala file) - those files should match what we have in this repo.

My view is get the release done and then find out if we can change the headers here. All in all, we should know some time next week so it shouldn't delay getting the other repos fixed up by much.

@mdedetrich
Copy link
Contributor Author

the impl is fine - if copying to other pekko repos, we might not want to change any files copied from this repo to those other repos in the past (like the AddMetaInfLicense scala file) - those files should match what we have in this repo.

Not sure what you mean here but what I meant is that I want to apply the same types of changes, i.e. update project/CopyrightHeader.scala so that it applies the standard ASF header not the bespoke one and also fix any existing new sources (i.e. not Akka based) to use the standard ASF header (which should include AddMetaInfLicense because this is something we created, it did not exist in Akka).

@pjfanning
Copy link
Contributor

If we get RC3 released and we then find out that we need to leave the headers as is, then any files that we have to leave as is and that were copied to other repos should be left as is in those other repos too.

I don't want to get RC3 blocked by getting this answered today.

@mdedetrich
Copy link
Contributor Author

Understood, thanks

Copy link
Contributor

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

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

lgtm - since Pekko 1.0.0 vote went ok

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.

3 participants