luckyframework / luckyframework/avram
Postinstall scripts do not ignore crystal version
Nobody has claimed this yet.
- Dominant language
- Crystal
- Stars
- 183
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/luckyframework/avram/blob/b3feadcc93d48ec1ee24c4a33f4eeaf5b089ee20/script/precompile_tasks#L9
I'm running `shards install --ignore-crystal-version` which works OK, except for when it gets to `postinstall` (defined in `shard.yml`). This runs `shards build` and fails because of an apparent *Crystal* version resolution failure.
I suggest `--ignore-crystal-version` be passed to any `shards` call in such scripts. This should leave the developer to decide in their own `shards install` call whether or not to ignore *Crystal* version. If the developer does not supply this argument and *Crystal* version resolution fails, `postinstall` won't run, so we're still covered.
Also applies to *Lucky*: https://github.com/luckyframework/lucky/blob/e2b15e75d522ecd82976945d83f991e1f967c6c3/script/precompile_tasks#L6, and probably more repos.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with script/precompile_tasks at the linked line and inspect the postinstall command in shard.yml. Verify how shards build handles the Crystal version when install was invoked with --ignore-crystal-version. Done means the postinstall build uses that flag and succeeds in the reported scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100