# Helping getting a repo to compile

**URL:** <https://forum.crystal-lang.org/t/helping-getting-a-repo-to-compile/4430>\
**Category:** Help & Support\
**Created:** [February 28, 2022, 5:51am UTC](https://forum.crystal-lang.org/t/helping-getting-a-repo-to-compile/4430 "2022-02-28T05:51:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swoorup](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/swoorup/32/1567_2.png) [@Swoorup](https://forum.crystal-lang.org/u/Swoorup)\
**Post date:** [February 28, 2022, 5:51am UTC](https://forum.crystal-lang.org/t/helping-getting-a-repo-to-compile/4430/1 "2022-02-28T05:51:30Z")

</div>

I am trying to compile this codebase: [GitHub - mikeroher/algo-backtest: An event-based backtester with a tree-hierarchy written in Crystal lang.](https://github.com/mikeroher/algo-backtest)

It seems quite neat. I have background in F#, Scala and can understand the code. But think I have run into tooling issues. I am on MacOSX installed via `brew install crystal` and using the following version:

```nohighlight
❯ crystal -v
Crystal 1.3.2 (2022-01-18)

LLVM: 13.0.0
Default target: x86_64-apple-macosx

```

Trying to compile gives the following:

```nohighlight
algo-backtest on  master [!] is 📦 v0.1.0 on ☁️ via 🔮 v1.3.2 
❯ shards install
Resolving dependencies
Fetching https://github.com/icyleaf/halite.git
Fetching https://github.com/spoved/vcr.cr.git
Fetching https://github.com/luckyframework/habitat.git
Fetching https://github.com/fridgerator/crystal_talib.git
Using halite (0.10.4)
Using habitat (0.4.3 at 318b838)
Using vcr (0.2.2)
Using crystal_talib (0.1.0)

algo-backtest on  master [!] is 📦 v0.1.0 on ☁️ via 🔮 v1.3.2 took 5s 
❯ crystal run examples/1_buy_and_hold.cr
Showing last frame. Use --error-trace for full trace.

In lib/halite/src/halite/features/logging.cr:1:1

 1 | require "logger"
     ^
Error: can't find file 'logger'

If you're trying to require a shard:
- Did you remember to run `shards install`?
- Did you make sure you're running the compiler in the same directory as your shard.yml?

```

---

<div class="post-metadata">

**Author:** ![naqvis](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/naqvis/32/906_2.png) [@naqvis](https://forum.crystal-lang.org/u/naqvis)\
**Post date:** [February 28, 2022, 6:31am UTC](https://forum.crystal-lang.org/t/helping-getting-a-repo-to-compile/4430/2 "2022-02-28T06:31:44Z")

</div>

Problem you are experiencing is due to incompatible versions of shard with current Crystal version. Or the shards which were built using previous versions of Crystal. For example `halite` is locked to version `0.10.4` while currently its updated for latest version of Crystal.

You can perform below steps to ensure latest versions of deps are retrieved.

1. Remove `lib` folder (as that contains the downloaded shards)
2. remove file `shard.lock` and perform a `shards install` again. That will ensure that latest version of dependencies are retrieved.

I don’t know if all dependent shards are updated for latest version of Crystal, but you can try above approach to see if this codebase is going to work with latest version of Crystal.

HIH.

---

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [February 28, 2022, 12:32pm UTC](https://forum.crystal-lang.org/t/helping-getting-a-repo-to-compile/4430/3 "2022-02-28T12:32:03Z")

</div>

Instead of deleting those things, you could just run `shards update` as well.
