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

Rework how we determine coordinate formats #1311

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

shs96c
Copy link
Collaborator

@shs96c shs96c commented Jan 16, 2025

The assumption that versions begin with numbers is fatally flawed in reality. Fortunately, where we're trying to disambiguate, most of the time, it's safe to assume that people mean a version number rather than some other format.

Closes #1290

@shs96c shs96c requested review from jin and cheister as code owners January 16, 2025 16:23
@shs96c shs96c assigned shs96c and jin and unassigned shs96c Jan 16, 2025
@shs96c shs96c force-pushed the coords-version-check branch 2 times, most recently from 53fecb3 to c3e59d2 Compare February 6, 2025 14:13
The assumption that versions begin with numbers is fatally flawed
in reality. Fortunately, where we're trying to disambiguate, most
of the time, it's safe to assume that people mean a version number
rather than some other format.
@cheister
Copy link
Collaborator

cheister commented Feb 7, 2025

Can you add a regression tests that cover one of the artifacts used in the issue?

# https://github.com/bazelbuild/rules_jvm_external/issues/1290
"com.google.apis:google-api-services-calendar:v3-rev20241101-2.0.0",

def _unusual_version_format_impl(ctx):
env = unittest.begin(ctx)

unpacked = unpack_coordinates("group:artifact:FY21R16")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we also add a test for a version that doesn't have any numbers?


# We add "pom" into SUPPORTED_PACKAGING_TYPES here because "pom" is not a
# packaging type that Coursier CLI accepts.
if unpacked.get("packaging", None) in SUPPORTED_PACKAGING_TYPES + ["pom"]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

TODO for another PR: It looks like SUPPORTED_PACKAGING_TYPES contains "pom" so probably not necessary to add it again here?

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.

rules_jvm_external 6.6 broken for maven installs
3 participants