Skip to content

Introduce the mappings feature #739

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

Merged
merged 8 commits into from
Apr 14, 2025
Merged

Introduce the mappings feature #739

merged 8 commits into from
Apr 14, 2025

Conversation

HU90m
Copy link
Contributor

@HU90m HU90m commented Mar 20, 2025

Introduce the mappings feature discussed in #727. See #727 (comment) for context.

Description of the feature from the documentation:

Mappings allow a user of a core to substitute dependencies of the core with other cores without having to edit any of the core or it's dependencies files. An example use case is making use of an existing core but substituting one of it's dependencies with a version that some desired changes (e.g. bug fixes).

I've restricted the flexibility of mappings in the interest of keeping this patch set smaller:

  • They cannot be recursive.
  • They cannot include versions.
  • Cores conflicting with substitutes aren't removed from the dependency tree.
    • For OpenTitan's use case, a flag can be used to disable the default primitives so there are no conflicts.

These restrictions can be lifted in the future commits, if deemed useful.

The commits are all self contained: lints and tests pass for every commit, so they don't need to be squashed. However, re-ordering may make sense.

HU90m added 8 commits March 20, 2025 07:19
This is useful for error messages.
The schema was predominantly spaces with a few tabs.
Mappings allow a user of a core to substitute dependencies of the core
with other cores without having to edit any of the core or it's
dependencies files. An example use case is making use of an existing
core but substituting one of it's dependencies with a version that some
desired changes (e.g. bug fixes).
@olofk olofk merged commit 749238f into olofk:main Apr 14, 2025
12 checks passed
@olofk
Copy link
Owner

olofk commented Apr 14, 2025

Very nice and clean set of commits. A+ :) I agree with the limitations. It's better to start small and then we can expand if needed, rather than promising too much to begin with. Picked and pushed! Many thanks for your contributions.

@olofk
Copy link
Owner

olofk commented Apr 14, 2025

There's one potential feature I could be interested in, and that's the possibility to set single mapping directly on the command line, e.g. --map some:virtual:core some:specific:core but it's more of a convenience than anything strictly needed.

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.

2 participants