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

Add support for optional depednencies #103

Closed
wants to merge 1 commit into from

Conversation

csweichel
Copy link
Collaborator

Description

This PR adds support for optional dependencies. This is useful in conjunction with dynamic packages.

Related Issue(s)

Fixes #100

How to test

Have a dependency to a package which doesn't exist and mark it optional, e.g. like in leeways workspace.

@codecov
Copy link

codecov bot commented Sep 29, 2022

Codecov Report

Merging #103 (cea072c) into main (ed95f65) will increase coverage by 0.32%.
The diff coverage is 33.33%.

@@           Coverage Diff            @@
##            main    #103      +/-   ##
========================================
+ Coverage   7.36%   7.69%   +0.32%     
========================================
  Files         19      19              
  Lines       2893    2912      +19     
========================================
+ Hits         213     224      +11     
- Misses      2648    2656       +8     
  Partials      32      32              

Copy link
Contributor

@mads-hartmann mads-hartmann left a comment

Choose a reason for hiding this comment

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

The code changes look good to me, but I'm not sure if this fixes #100 - I left a comment on the issue to explain further here - it would be nice to reproduce the error on main first and then show that it still works when the package is marked as optional and the BUILD.js is modified to only add the package if a build flag is set.

return segs[0], segs[1]
}

// Component returns the component of the depdency
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Small typo

Suggested change
// Component returns the component of the depdency
// Component returns the component of the dependency

@csweichel
Copy link
Collaborator Author

Closed because of #100 (comment)

@csweichel csweichel closed this Sep 29, 2022
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.

presence of dynamic packages leads to linking error during leeway exec
2 participants