crystal-lang / shards

Dependency manager for the Crystal language
Other
758 stars 99 forks source link

shards outdated - Unsupported ref type for this resolver #625

Open petr-fischer opened 2 months ago

petr-fischer commented 2 months ago

Some Crystal library projects have examples subdir and in the example apps, there is ../.. dependency to the library.

For example crinja here: https://github.com/straight-shoota/crinja

You can cd examples\server, then do shards install.

But shards outdated prints this error:

Resolving dependencies
Unhandled exception: Unsupported ref type for this resolver:  (Exception)
  from /shards/src/resolvers/resolver.cr:60:7 in 'latest_version_for_ref'
  from /shards/src/commands/outdated.cr:70:30 in 'run:prereleases'
  from /shards/src/cli.cr:110:9 in '->'
  from /crystal/src/option_parser.cr:488:22 in '__crystal_main'
  from /crystal/src/crystal/main.cr:129:5 in 'main'
  from src/env/__libc_start_main.c:95:2 in 'libc_start_main_stage2'

It has probably some problem with resolving ..\.. dependency path.

➤  shards --version
Shards 0.18.0 [31b44d3] (2024-03-28)

➤  crystal --version
Crystal 1.12.0 [aee9ab69e] (2024-04-09)

LLVM: 15.0.7
Default target: x86_64-unknown-linux-gnu

➤ cat /etc/os-release
PRETTY_NAME="Ubuntu 23.10"
VERSION="23.10 (Mantic Minotaur)"