crystal-lang / install-crystal

GitHub Action: Install Crystal programming language
https://crystal-lang.github.io/install-crystal/configurator.html
MIT License
68 stars 8 forks source link

crystal nightly + shards nightly is broken on Windows #24

Closed straight-shoota closed 1 year ago

straight-shoota commented 1 year ago

Example CI run: https://github.com/crystal-lang/install-crystal/actions/runs/4453968253/jobs/7822837689#step:4:27

This has been broken for a couple of months apparently.

The action seems to be trying to build shards on Windows which fails.

make
mkdir -p lib/molinillo
shards install || (curl -L "https://github.com/crystal-lang/crystal-molinillo/archive/v   Creating library C:\Users\runneradmin\AppData\Local\crystal\cache\crystal-run-eval.tmp.lib and object C:\Users\runneradmin\AppData\Local\crystal\cache\crystal-run-eval.tmp.exp 0.2.0.tar.gz" | tar -xzf - -C lib/molinillo --strip-components=1)

---
Error: Error: Command failed: make
File not found - *.cr
/usr/bin/bash: line 1: shards: command not found
curl: (3) URL using bad/illegal format or missing URL
straight-shoota commented 1 year ago

The problem is that the crystal eval commands prints some unrelated debug information to stdout which should probably go to stderr instead:

$ crystal eval 'require "yaml"; puts YAML.parse(File.read("shard.lock"))["shards"]["molinillo"]["version"]'
Creating library C:\Users\runneradmin\AppData\Local\crystal\cache\crystal-run-eval.tmp.lib and object C:\Users\runneradmin\AppData\Local\crystal\cache\crystal-run-eval.tmp.exp
0.2.0

So this is not a bug in install-crystal. It's the compiler and/or shards' Makefile that need a fix. We can't really do anything about it here except building shards manually without make. I don't think that should be necessary, though.

HertzDevil commented 1 year ago

Everything should be fine if here we manage to grab a Windows Crystal package with a libiconv static library built with crystal-lang/crystal#13219 applied

straight-shoota commented 1 year ago

This has been properly resolved. All builds have been green for some time.