feat(csharp): port updates from Apache repo#43
Conversation
| /* | ||
| * Copyright (c) 2025 ADBC Drivers Contributors | ||
| * | ||
| * This file has been modified from its original version, which is |
There was a problem hiding this comment.
@davidhcoe We interpreted Section 4 (Redistribution) of the Apache 2.0 License to mean that we should retain the existing license header beneath the new copyright notice and modification statement.
Rather that doing this in an exacting way (only changing the headers in files that have actually been modified here, which would have been hard to enforce) we decided to simply apply this same license header to all the files:
/*
* Copyright (c) 2025 ADBC Drivers Contributors
*
* This file has been modified from its original version, which is
* under the Apache License:
*
* 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.
*/
For newly added files that don't contain any code that was originally in an ASF repo, we can use this header instead:
/*
* Copyright (c) 2025 ADBC Drivers Contributors
*
* Licensed 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.
*/
@lidavidm can we add license enforcement here? I'm not sure there's a practical way to enforce the use of these two different headers depending on whether the contents is original or migrated from the ASF repo.
There was a problem hiding this comment.
It's already being enforced by pre-commit. What's the problem?
There was a problem hiding this comment.
Ah, yeah, there's no way for it to tell which one is needed. I could perhaps hack that in with a hardcoded list of imported files, if you prefer.
There was a problem hiding this comment.
@davidhcoe are you all using precommit?
@lidavidm is there any way to make the precommit disallow changes to the "This file has been modified" header in existing files, but allow new files to use either of the two headers above?
There was a problem hiding this comment.
I would have to either update the hook to also parse the diff, or just have a way to list out which files need the header (the latter is probably easier, and idempotent)
There was a problem hiding this comment.
Note that precommit is enforced by CI.
There was a problem hiding this comment.
I did not have pre-commit running for this repo. I get some failures with the RAT part so I have to fiddle with it. I think I have all the headers aligned now.
## What's Changed adbc-drivers/bigquery#43 (comment) Closes #13.
What's Changed
This contains breaking changes.
Closes #NNN.