ceylon / ceylon-module-resolver

DEPRECATED
Apache License 2.0
23 stars 9 forks source link

add constants for dart artifacts #122

Closed jvasileff closed 9 years ago

jvasileff commented 9 years ago

This PR adds minimal support for Dart file extensions. The need for this is an inability to "get" artifacts (storing isn't a problem!) from a repository manager with unknown suffixes:

com.redhat.ceylon.model.cmr.RepositoryException: Unknown suffix in simple-1.0.0.dart
    at com.redhat.ceylon.cmr.api.ArtifactContext.getSuffixFromFilename_(ArtifactContext.java:291)
    at com.redhat.ceylon.cmr.api.ArtifactContext.getSuffixFromFilename(ArtifactContext.java:259)
    at com.redhat.ceylon.cmr.api.ArtifactContext.getSuffixFromNode(ArtifactContext.java:250)
    at com.redhat.ceylon.cmr.impl.AbstractNodeRepositoryManager.getArtifactResult(AbstractNodeRepositoryManager.java:169)
    at com.redhat.ceylon.cmr.api.AbstractRepositoryManager.getArtifact(AbstractRepositoryManager.java:87)

The Dart backend is currently just an experiment. But it's a big experiment, and potentially useful. Without this patch, it will be much more difficult to let others try it out. So, if it doesn't look like it will cause problems, it would be great if this can be merged.

quintesse commented 9 years ago

Whaddayathink @FroMage ? It's not that this code is unwanted IMO, but it just shows that the current design of the CMR is not meant for easy extension with previously unknown file-types. I wonder if we shouldn't just open it up to any file you want to store/retrieve and only filter what we store on the Herd.

jvasileff commented 9 years ago

Bump.

A more general improvement sounds nice, but does that need to hold up this PR?

quintesse commented 9 years ago

Everybody is on holiday, so it's not a good time to be asking for a quick merge :) I think that people who want to try this out right now can apply a patch.

jvasileff commented 9 years ago

I'm just hoping for a "medium" merge - something for 1.2.

quintesse commented 9 years ago

Sure, no problem, we'll either come up with something better for 1.2 or we'll just merge this temporarily.

jvasileff commented 9 years ago

Great, thanks!

FroMage commented 9 years ago

Good enough for me ;)

jvasileff commented 9 years ago

Thanks!