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

Adds "uses" and "block" APIs #1945

Draft
wants to merge 1 commit into
base: 6.x
Choose a base branch
from

Conversation

nickclark2016
Copy link
Member

What does this PR do?

Adds the uses and block APIs. uses accepts a set of strings and block is a scoped API that accepts a name and a function. The goal of the API is to provide easy configuration reusability. The planned API behaviors are as follows:

  • A block provides a reusable set of definitions, such as links and includeDirs. These will allow both the project owning the block and external projects to consume the block.
  • A block is consumed via the uses API. By using a block, the consumer will link against the project and inherit its linked projects, library directories, include directories, defines, and more.
  • When a block is consumed by uses, it will also inherit downstream dependencies. That is to say if block A uses block B and block B uses block C, block A will inherit from block C as well.

How does this PR change Premake's behavior?

No breaking behavior.

Anything else we should know?

Addresses concerns brought up in #1346

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

core/modules/dom/src/block.lua Outdated Show resolved Hide resolved
core/modules/dom/src/block.lua Outdated Show resolved Hide resolved
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