-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Normalize all file headers to the expected Apache 2.0 license #19409
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
Conversation
...ure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/AccessDenied.cshtml.cs
Show resolved
Hide resolved
@@ -1,3 +1,6 @@ | |||
// Copyright (c) .NET Foundation. All rights reserved. | |||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files under /ws-proxy
need to be excluded from this change as they are shared-source from the Mono repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these files expected to have the MIT header after all changes are made? If so, I recommend keeping them in this state for one commit since the next commit will convert everything seen in this PR to the MIT headers. Otherwise, let me know the expected final state of the files and I'll work on setting things up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, they are expected to remain identical (byte-for-byte) to their current state.
// Copyright (c) Andrew Arnott. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this is a legitimate change. Files under /BlazorPack
are being used on a shared-source basis. I don't think we get to change the copyright header.
@@ -1,6 +1,5 @@ | |||
// Licensed to the .NET Foundation under one or more agreements. | |||
// The .NET Foundation licenses this file to you under the MIT license. | |||
// See the LICENSE file in the project root for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So these were taken from CoreFX I think, hence we kept their license. Assuming that we'll be switching them all back to the MIT header shortly I think this is OK, but I want to raise them as a possible oddity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the next commit changes everything here plus ~7200 other files to use the MIT header. Normalizing the headers before the change makes that one much easier to review because all changed files are changed in exactly the same way.
@@ -1,6 +1,5 @@ | |||
// Copyright (c) .NET Foundation. All rights reserved. | |||
// Licensed under the Apache License, Version 2.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @Tratcher this will trigger our sync bot right? How does it handle license headers today? The eventual change (moving to MIT headers) should simplify things, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the bot will pick up any src difference in these shared/runtime files. Ideally runtime would have it's licence changed first. Otherwise we'll want to disable the bot until both sides are updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or exclude the src/shared/runtime directory and deal with it later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runtime should already be MIT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sharwell do you want to update the licenses in the runtime repo to MIT or should I? See the readme for syncing the changes.
https://github.com/dotnet/runtime/blob/master/src/libraries/Common/src/System/Net/Http/aspnetcore/ReadMe.SharedCode.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we just sync the runtime after our transition is complete using our usual process? It's still manual (even if tracked automatically).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to limit how long they're out of sync. It makes syncing other changes harder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, would like @Tratcher to confirm he's at least seen this and aware of what it will do to our sync process with the runtime for src/shared/runtime
Are .ts and .java files being checked by your script? Because there are a bunch of those that will need to be updated |
Also, we need to resolve @SteveSandersonMS 's comments before merging. |
@BrennanConroy Not currently. Thanks for bringing that up. I was looking at a filtered view to address managed code changes first. I'll submit a separate pull request to deal with changes in other content types. Also, I'm not using a script. All the changes here were made by a new analyzer and code fix coming for Visual Studio hopefully in 16.6. 🎉 |
Looks like some tests read source files and assert the contents will need to be fixed up. |
I've dealt with src/shared/runtime and src/shared/shared.tests/runtime, you can remove them from this PR. |
@sharwell - sorry for letting this sit. Can you either re-do, or teach me how to re-do, and I'll make sure to get it going this time? |
@Pilchie should someone take over this PR? I can take a look as this has been sitting for many months. |
Ah didn't know there was tooling. I'll wait to do this then. |
I wouldn't mind someone else taking this over. It turned out to be more complex than expected on two fronts:
For cases that are expected to follow a standard header, the new analyzers certainly do work. 😄 |
@@ -1,5 +1,5 @@ | |||
// Copyright (c) .NET Foundation. All rights reserved. | |||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization; | |||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering: Where did all of the using Microsoft.AspNetCore.Authorization;
typos creep in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating the files under src/Shared/runtime/ is pointless because those files be overwritten by dotnet/runtime changes (see .github/workflows/runtime-sync.yml). And, they already have MIT licenses.
Closing this in lieu of #34573. |
This change makes the conversion to MIT simpler by ensuring the repository starts with all headers in a known state. This change should be reviewed to make sure we aren't adding a header to a file where it would change meaning, and we aren't changing the header in a file that should keep its original header.
Edit: Only C# files are updated in this pull request. Other content types will be updated in a separate pull request.