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

core.scm:local_url=allow|block #16597

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Jul 3, 2024

Changelog: Feature: Introduce core.scm:local_url=allow|block to control local folder URLs in conandata scm.
Changelog: Fix: Raise an error when trying to upload a package with a local folder URL in conandata scm.
Docs: conan-io/docs#3801

Close #16591

Co-authored-by: Abril Rincón Blanco <[email protected]>
@jasal82
Copy link
Contributor

jasal82 commented Jul 3, 2024

This will work if everyone stores the url in scm.url. But your migration guide already recommends otherwise for replacing the scm attribute

https://docs.conan.io/1/migrating_to_2.0/recipes.html#the-scm-attribute

So you'd have to include sources.url as well. And any other possible structure because it is never validated. I think we'd have to create an interface for interacting with conandata to be able to do this reliably.

@memsharded
Copy link
Member Author

This will work if everyone stores the url in scm.url. But your migration guide already recommends otherwise for replacing the scm attribute

This has been normalized in Conan 2 with the coordinates_to_conandata and checkout_from_conandata_coordinates helpers, that will always store it in conandata->scm->url. The intention is to fully normalize it, and even leverage this information for other functionality.

https://docs.conan.io/1/migrating_to_2.0/recipes.html#the-scm-attribute

This is a mistake in the docs, and should be updated to reflect the new convention.

@jasal82
Copy link
Contributor

jasal82 commented Jul 3, 2024

I see, that's good to know. That means I'll have to create another release of our base conanfile that uses the conventions from those new functions, so that we can replace them with the actual function calls once we're ready to switch to Conan 2.

@memsharded
Copy link
Member Author

Yes, sorry about that, the "standardization" of the conandata->scm->url/commit happened in #15377, that was 1 year after the Conan 2.0 launch, so the Conan 1 docs were no longer updated with these things.

@memsharded memsharded marked this pull request as ready for review July 9, 2024 12:55
@czoido czoido merged commit 0b5860e into conan-io:develop2 Jul 11, 2024
2 checks passed
@memsharded memsharded deleted the feature/core_scm_local_allow branch July 11, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Recipes with invalid remote URLs in conandata can be uploaded
5 participants