abcl icon indicating copy to clipboard operation
abcl copied to clipboard

Fix typo in resolve method

Open adlai opened this issue 11 years ago • 6 comments

Currently,

CL-USER(21): (abcl-asdf:resolve "com.xeiam.xchange:xchange-core")
#<THREAD "interpreter" {4E3DB38D}>: Debugger invoked on condition of type PROGRAM-ERROR
  Wrong number of arguments for #<RESOLVE-DEPENDENCIES {164FBB94}>; at least 2 expected.

fails, and this succeeds instead:

CL-USER(23): (abcl-asdf:resolve "com.xeiam.xchange/xchange-core")
WARNING: Using LATEST for unspecified version.
...

adlai avatar Sep 08 '14 21:09 adlai

Interesting. I've been (erroneously?) using slash there. I have a hard time finding a specification for maven artifact (?) designators (or whatever these strings are called). Can you point me to some documentation that describes the rules/conventions for these things? thanks!

slyrus avatar Sep 09 '14 16:09 slyrus

I was working off the contrib's own documentation:

https://github.com/adlai/abcl/blob/patch-1/contrib/abcl-asdf/README.markdown#example-2

This page from Maven's documentation uses colon syntax:

https://maven.apache.org/plugins/maven-dependency-plugin/examples/filtering-the-dependency-tree.html

adlai avatar Sep 09 '14 16:09 adlai

It's not clear to me if the correct thing to do is to fix the code or the documentation. I was expecting some sort of standard maven URI description. It is true that the syntax for filter patterns is as you describe but these guys, e.g., https://ops4j1.jira.com/wiki/display/paxurl/Mvn+Protocol use a syntax with slashes. I guess I don't really care but since there doesn't seem to really be a standard here I'm not super inclined to change the format unless there's a good reason to do so.

slyrus avatar Sep 09 '14 16:09 slyrus

OK, modified the commit to leave behavior as-is, and updated the documentation.

adlai avatar Sep 09 '14 17:09 adlai

I'm still not sure what the right thing to do is here and am open to suggestions. The maven resolution code could definitely use some help but it sounds like making sure the code and documentation (and hopefully the people who use both) are on the same page regarding the spec for the maven artifact URI-like things would be a good thing.

slyrus avatar Sep 09 '14 17:09 slyrus

ABCL-ASDF:RESOLVE is deliberately generous, attempting to parse either format (i.e. accepting both "group-id/artifact-id" and "group-id:artifact-id"). But the NAMESTRING of the parsed object provides the canonical CL:TRUENAME of the "mvn" schema.

easye avatar Sep 29 '16 22:09 easye

I wonder whether "Close with comment" is appropriate; obviously, the cleanest click.

adlai avatar Aug 21 '24 17:08 adlai