Skip to content

feat: relax the rule for the CAPI=2: in core files that it must be in the first line #792

Description

@tymonx

Currently FuseSoC is enforcing that the CAPI=2: must be located at the first line of the *.core file. If not, FuseSoC will greed you with this message and fail:

WARNING: The first line of the core file design.core must be  "CAPI=1" or "CAPI=2:".  The first line of this core file is "".
WARNING: Unable to determine CAPI version from core file design.core

This has two major implications:

  • Cannot use generic YAML formatter tools out-of-box or with default configuration because mostly these tools will try to insert the YAML --- marker (start of YAML documentation) in *.core files, making FuseSoC unhappy about that
  • Cannot use comments with copyright and license (SPDX) at the beginning of a core file. Some license validation/check tools don't like that

The closest one is:

CAPI=2:
# SPDX-FileCopyrightText: © 2026 John Doe <john.doe@fusesoc.com>
# SPDX-License-Identifier: Apache-2.0

The proposition is to relax this rule and at least to have something like this:

---
# SPDX-FileCopyrightText: © 2026 John Doe <john.doe@fusesoc.com>
# SPDX-License-Identifier: Apache-2.0

CAPI=2:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions