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

project_loader: allow loading null parts #2153

Merged

Conversation

kyrofa
Copy link
Contributor

@kyrofa kyrofa commented Jun 4, 2018

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on bug reports?
  • If this is a new feature. Have you discussed the design on the forum?
  • Have you successfully run ./runtests.sh static?
  • Have you successfully run ./runtests.sh unit?

This PR fixes LP: #1772027 by allowing one to specify remote parts without requiring the use of after, which implies a relationship which may not exist. With this PR, one can specify that the want a remote part simply by listing the part name, e.g.:

parts:
  my-part:
    plugin: whatever
    # build my stuff

  # Also pull in gtk3, although my-part doesn't strictly depend on it for
  # pulling or building.
  desktop-gtk3:

This allows one to specify remote parts without requiring the use of
`after`, which implies a relationship which may not exist.

LP: #1772027

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@codecov-io
Copy link

codecov-io commented Jun 4, 2018

Codecov Report

Merging #2153 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2153      +/-   ##
==========================================
+ Coverage    91.3%   91.31%   +<.01%     
==========================================
  Files         193      193              
  Lines       12165    12167       +2     
  Branches     1812     1813       +1     
==========================================
+ Hits        11107    11110       +3     
  Misses        715      715              
+ Partials      343      342       -1
Impacted Files Coverage Δ
snapcraft/internal/project_loader/_config.py 99.56% <100%> (ø) ⬆️
snapcraft/internal/elf.py 83.17% <0%> (+0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6ba1469...bcea575. Read the comment docs.

Copy link
Collaborator

@sergiusens sergiusens left a comment

Choose a reason for hiding this comment

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

tested this one locally with multiple remote parts, works great.

@sergiusens sergiusens merged commit 78cb692 into canonical:master Jun 4, 2018
brlin-tw added a commit to brlin-tw/snapcrafters-template-plus that referenced this pull request Sep 6, 2018
Since Snapcraft 2.43 it is possible to include a remote part without
specify it in a part's `after` value.  This allows parts that not
actually depend on each other from being bond together by dependency
, for example build step of yad part being cleaned due to change in
desktop-gtk3.

Refer-to: Bug #1772027 “Pull stage of an unspecified part is unexpectedly cleaned by snapcraft” : Bugs : Snapcraft <https://bugs.launchpad.net/snapcraft/+bug/1772027>
Refer-to: project_loader: allow loading null parts by kyrofa · Pull Request #2153 · snapcore/snapcraft <canonical/snapcraft#2153>
Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
brlin-tw added a commit to brlin-tw/poedit that referenced this pull request Nov 28, 2018
Prefer this new syntax introduced in Snapcraft 2.43 to avoid the
cleaning of the poedit part due to the modification of the
desktop-gtk3 part.

Refer: canonical/snapcraft#2153
brlin-tw added a commit to brlin-tw/qxmledit that referenced this pull request Dec 22, 2018
Since Snapcraft 2.43 it's now possible to specify building a part
without listing it in an existing part's after clause, which may cause
the depending part unnecessarily cleaned due to the dependency.

Refer canonical/snapcraft#2153 for more info about the syntax.

Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
vslavik pushed a commit to vslavik/poedit that referenced this pull request Jan 11, 2019
Prefer this new syntax introduced in Snapcraft 2.43 to avoid the
cleaning of the poedit part due to the modification of the
desktop-gnome-part part.

Refer: canonical/snapcraft#2153
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.

None yet

3 participants