Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found issues #11

Closed
mainrs opened this issue May 23, 2024 · 3 comments
Closed

Module not found issues #11

mainrs opened this issue May 23, 2024 · 3 comments

Comments

@mainrs
Copy link

mainrs commented May 23, 2024

Hello, I am new to Gleam!

I tried to use this package but I cannot get it to work properly. My code is available at https://github.com/mainrs/advent-of-code.

advent-of-code on  main gleam run -m gladvent run 1 2 --year=2023  
   Compiled in 0.03s
    Running gladvent.main
error: Failed to run 2023 day 1

cause:
  0: failed to get runner
  1: module aoc_2023/day_1 not found


error: Failed to run 2023 day 2

cause:
  0: failed to get runner
  1: module aoc_2023/day_2 not found

I don't really understand what I am doing wrong tbh....

@TanklesXL
Copy link
Owner

TanklesXL commented May 25, 2024

hi there!

First off, thanks for using gladvent!

You aren't doing anything wrong as far as i could tell. Your code actually works properly, and I was able to run it (i've dropped a copy of the output below)!

What is happening is due to a bug with the existing gleam export package-interface command that gladvent has used as of v0.7.0

You have 2 options here:

  1. downgrade to gladvent version v0.6.2 (gladvent = "0.6.2" in your gleam.toml) which has all the same functionality exept does not use gleam export package-interface (the downside being you don't get your functions type-checked by gladvent.

  2. in between each time you call gleam run, call gleam clean or delete the gleam build cache with the following (from the root of the repo)

rm -r build/prod/erlang build/dev/erlang

Here is the output from running gleam run -m gladvent run --year=2023 1 2 3

   Compiled in 5.49s
    Running gladvent.main
Ran 2023 day 1:
  Part 1: Ok(12402)
  Part 2: error: todo - part 2 not implemented in module aoc_2023/day_1 in function pt_2 at line 23

Ran 2023 day 2:
  Part 1: error: todo - part 1 not implemented in module aoc_2023/day_2 in function pt_1 at line 2
  Part 2: error: todo - part 2 not implemented in module aoc_2023/day_2 in function pt_2 at line 6

Ran 2023 day 3:
  Part 1: error: todo - part 1 not implemented in module aoc_2023/day_3 in function pt_1 at line 2
  Part 2: error: todo - part 2 not implemented in module aoc_2023/day_3 in function pt_2 at line 6

@TanklesXL TanklesXL assigned TanklesXL and unassigned TanklesXL May 25, 2024
@TanklesXL TanklesXL pinned this issue May 25, 2024
@TanklesXL
Copy link
Owner

TanklesXL commented May 25, 2024

@mainrs I've actually just published gladvent v0.7.2 which should fix this, please run gleam update to fetch the latest version and give it a shot 😄

@mainrs
Copy link
Author

mainrs commented May 27, 2024

It works now, thanks!

@mainrs mainrs closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants