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

Feature/premakedeps #13350

Closed
wants to merge 6 commits into from
Closed

Conversation

Ohjurot
Copy link
Contributor

@Ohjurot Ohjurot commented Mar 6, 2023

Summary
Changelog: Feature / Bugfix: Adding support for premake5 (PremakeDeps) fixes #13275
Docs: https://github.com/conan-io/docs/pull/XXXX

Features

  • Implements lua file generation for premake consumption (New feature for 2.0)
  • Supports multi build with changing architecture and configuration (New for the premake tool)
  • Generates a lua file with variables (includedirs, libdirs, ...) per configuration (Based on existing implementation, adapted for multi build and new architecture)
  • Generates a lua file with functions (Just build/compiler setup, linker setup and both) for automatic premake project setup per package and profile/config (Breaks compatibility with conan1 but is way more flexible)
  • Generates a lua file with functions (see previous) for automatic premake project setup per package
  • Generates a global conandeps.premake5.lua file with functions (see previous) for automatic premake project setup.
  • Has fallback capabilities to release when no fitting conan configuration is available

Status
WIP-Status: Code works and has been covered with a basic unit test. Documentation is still required.

Checklist

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

@CLAassistant
Copy link

CLAassistant commented Mar 6, 2023

CLA assistant check
All committers have signed the CLA.

- Fixed bugs that only occur in "fresh" deployments
- Fixed bugs that only occur in edge cases
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

I think this looks quite good, clean, with templates, new test, etc, good job.

If we want to move this forward for the next patches releases 2.0.X, this PR should be targeted to the release/2.0 branch. As long as we don't document it, it should be very doable.

At some point we might want to add some functional test that really builds something simple, but that can wait a bit if you are running functional testing on your side.

pkg_files = []
dep_names = []
for require, dep in list(host_req.items()) + list(test_req.items()) + list(build_req.items()):
dep_name = require.ref.name
Copy link
Member

Choose a reason for hiding this comment

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

This for internals is a bit too long, might benefit from some splitting.

f"{self.tab * indent}{line}" for line in list(filter(None, string.splitlines()))
])

def _premake_filtered(self, content, configuration, architecture, indent=0):
Copy link
Member

Choose a reason for hiding this comment

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

These filters are quite unknown for others (like us) not knowing Premake. A short explanation or a link to somewhere that defines what are those would be nice.

@Ohjurot
Copy link
Contributor Author

Ohjurot commented Mar 8, 2023

@memsharded Thank you for your first feedback. I will close this PR then and open a new one based on the correct branch and targeted towards release/2.0.

@Ohjurot Ohjurot closed this Mar 8, 2023
@Ohjurot Ohjurot mentioned this pull request Mar 8, 2023
5 tasks
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.

3 participants