Skip to content

SPDX: Multiple licenses in same file #8989

Closed
@frangio

Description

@frangio

Flattening entire source trees into a single file is very common practice as it's an easy way of verifying contract source code. This causes a few issues with the new SPDX comments.

  1. Multiple SPDX comments cause a compiler error, so the existing flattening tools will stop working unless they combine the comments into one in some smart way.
  2. Different parts of the combined file may be licensed in different ways. I took a look at the SPDX documentation but couldn't understand if this situation is supported by the standard. I understand that there are license expressions that can combine multiple licenses but I'm not sure if it's okay to use that when each license applies to a different section of a file. Can you provide some guidance on this topic?

Is it possible at least to remove the compiler error if multiple equal SPDX comments are found?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions