Skip to content

Comments

Add license headers to Markdown files#3097

Merged
gribozavr merged 1 commit intomainfrom
add-license-headers
Feb 17, 2026
Merged

Add license headers to Markdown files#3097
gribozavr merged 1 commit intomainfrom
add-license-headers

Conversation

@gribozavr
Copy link
Collaborator

This commit adds the SPDX-License-Identifier: CC-BY-4.0 header to all Markdown (.md) files in the src/ directory.

It also adds SPDX-License-Identifier: Apache-2.0 headers to Rust code blocks within these Markdown files. The headers in code blocks are prefixed with # to hide them in the rendered book.

The year of the copyright notice is determined from the first commit that added the file to the repository.

This commit adds the `SPDX-License-Identifier: CC-BY-4.0` header to all
Markdown (`.md`) files in the `src/` directory.

It also adds `SPDX-License-Identifier: Apache-2.0` headers to Rust code
blocks within these Markdown files. The headers in code blocks are prefixed
with `#` to hide them in the rendered book.

The year of the copyright notice is determined from the first commit that
added the file to the repository.
Comment on lines 8 to 13
```rust,ignore
# // Copyright 2023 Google LLC
# // SPDX-License-Identifier: Apache-2.0
#
{{#include ../../../../third_party/cxx/book/snippets.rs:shared_enums_bridge}}
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm sure a Google lawyer told you to add these 😄 but did the lawyer also consider that there can be a minimum size for a published work to be copyrightable?

Even the FSF does not consider it necessary to get a copyright assignment for changes that touch only a few lines (they say less than 15 or so).

Copy link
Collaborator

@mgeisler mgeisler left a comment

Choose a reason for hiding this comment

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

I think these changes are unnecessary as the license is stated clearly in the README and in larger files. However, I assume a friendly Google lawyer asked for this, so here we go.

Copy link
Collaborator

@hurryabit hurryabit left a comment

Choose a reason for hiding this comment

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

I'm sad we have to do this.

@gribozavr gribozavr merged commit d4ea474 into main Feb 17, 2026
40 checks passed
@gribozavr gribozavr deleted the add-license-headers branch February 17, 2026 15:06
@mgeisler
Copy link
Collaborator

This should be reverted as it caused #3101, which degrades the experience of teaching the course. I'll be teaching a new class tomorrow, so I'm removing this from my own branch until we can fix it here.

mgeisler added a commit to mgeisler/comprehensive-rust that referenced this pull request Feb 23, 2026
This reverts commit d4ea474.

The copyright headers show up in the finished slides, making teaching
the course a much worse experience.
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