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

[question] Is it safe to use self.package_path? ? #12173

Closed
1 task
uilianries opened this issue Sep 22, 2022 · 1 comment · Fixed by #16247
Closed
1 task

[question] Is it safe to use self.package_path? ? #12173

uilianries opened this issue Sep 22, 2022 · 1 comment · Fixed by #16247
Assignees
Milestone

Comments

@uilianries
Copy link
Member

Related to conan-io/docs#2753

The self.package_path is not documented but looks stable and it uses Path library, which is easier than os.path usage.

/cc @jellespijker

@AbrilRBS AbrilRBS self-assigned this Apr 23, 2024
@AbrilRBS AbrilRBS added this to the 2.3.0 milestone Apr 23, 2024
@czoido czoido modified the milestones: 2.3.0, 2.4.0 May 6, 2024
@memsharded
Copy link
Member

After syncing with the team, we are going to deprecate this.
Even if it is slightly more convenient for some users there are some downsides:

  • it is ugly for an api to have duplicated things, it can be confusing for users
  • The api inputs cannot be Path objects in general, as Conan internally uses old-style paths
  • This cannot be changed, it would be breaking. It can be "fixed" and add adaptors in the definition points, but this surely be fragile and require time to polish, creating some instability.
  • Users might have issues if they obtain Path objects via the Conan interface, but Conan failing when passing those objects as inputs.

As this was never really documented, it will be marked for deprecation and removed in few releases. Users wanting to use Path in their recipes can perfectly do Path(self.xxxx_folder), it is very simple and explicit in the recipe.

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.

5 participants