Skip to content
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

Restore pre-0.25 nested layers compatibility #596

Merged
merged 6 commits into from
Nov 2, 2024

Conversation

jkloetzke
Copy link
Member

Add the managedLayers policy for backwards compatibility.

Fixes #595.

Copy link

codecov bot commented Nov 2, 2024

Codecov Report

Attention: Patch coverage is 94.59459% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.89%. Comparing base (b014848) to head (d4dad4b).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
pym/bob/input.py 91.30% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #596      +/-   ##
==========================================
- Coverage   88.90%   88.89%   -0.01%     
==========================================
  Files          48       48              
  Lines       15341    15360      +19     
==========================================
+ Hits        13639    13655      +16     
- Misses       1702     1705       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The bob.input.Recipe.getLayer() method returns a list. This was changed
inadvertently in 6f84d58 to return just a string. As the method is
part of the public plugin API, we'd better keep it that way, even if
the list will only have one element at most.
Historically, layers could be nested where they would form a tree
structure. This has been removed with the introduction of managed
layers in f70beb1. Turns out, this was a bit optimistic because there
are existing projects that rely on this.

To bring back the old behaviour, add the managedLayers policy. If the
policy is on the old behaviour, nested layers are supported. To keep
things simple, any managed layer will be rejected in this case. If the
managedLayers policy is set to the new behaviour, all layers will be
placed flat in the project- resp. build-directory.

Fixes BobBuildTool#595.
If the managedLayers policy is set to the old behaviour, we already
refuse to parse projects that use layer SCMs. Also do this for the "bob
layers" command for a consistent behaviour.
@jkloetzke jkloetzke merged commit e3644bb into BobBuildTool:master Nov 2, 2024
11 checks passed
@jkloetzke jkloetzke deleted the layer-compat branch November 2, 2024 21:02
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.

layers: backwards compatibility for nested layers
1 participant