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

[Doc] Unclarity in provided example for package_id method #3919

Open
ytsarko opened this issue Nov 26, 2024 · 2 comments · Fixed by #3920
Open

[Doc] Unclarity in provided example for package_id method #3919

ytsarko opened this issue Nov 26, 2024 · 2 comments · Fixed by #3920
Assignees
Milestone

Comments

@ytsarko
Copy link

ytsarko commented Nov 26, 2024

Hello!

Currently the way package_id() method is documented leads to a confusion: why package_id method of recipe returns some inner function called 'package_id '? Just for the clarity, this is the current definition of package_id method on the documentation page:

def package_id(self):
    def package_id(self):
        if self.package_type == "header-library":
            self.info.clear()
        else:
            self.info.settings.rm_safe("compiler.libcxx")
            self.info.settings.rm_safe("compiler.cppstd")

Please check whether documentation snippet of package_id method doesn't contain any error and if not, what is the intention of returning a reference to the function from package_id method then?

@AbrilRBS AbrilRBS self-assigned this Nov 26, 2024
@AbrilRBS AbrilRBS added this to the 2.9.0 milestone Nov 26, 2024
@AbrilRBS
Copy link
Member

Hi @ytsarko thanks a lot for your report, this is indeed a typo, and the package_id() method is meant to just be the inner one, something like

def package_id(self):
        if self.package_type == "header-library":
            self.info.clear()
        else:
            self.info.settings.rm_safe("compiler.libcxx")
            self.info.settings.rm_safe("compiler.cppstd")

I'll make sure to fix this for the latest version :)

@ytsarko
Copy link
Author

ytsarko commented Nov 26, 2024

Thank you @AbrilRBS, for quick confirmation!

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 a pull request may close this issue.

2 participants