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

Could not compile instructor in livebook #25

Open
Munksgaard opened this issue Feb 29, 2024 · 10 comments
Open

Could not compile instructor in livebook #25

Munksgaard opened this issue Feb 29, 2024 · 10 comments

Comments

@Munksgaard
Copy link

When trying to run the quickstart example in my local livebook, I get this error:

Could not compile :instructor, no "mix.exs", "rebar.config" or "Makefile" (pass :compile as an option to customize compilation, set it to "false" to do nothing)
Unchecked dependencies for environment dev:
* instructor (/home)
  could not find an app file at "_build/dev/lib/instructor/ebin/instructor.app". This may happen if the dependency was not yet compiled or the dependency indeed has no app file (then you can pass app: false as option)
@Munksgaard
Copy link
Author

Looks like the problem is the path specification.

@TwistingTwists
Copy link
Contributor

TwistingTwists commented Feb 29, 2024

Please change

{:instructor, path: Path.expand("../", __DIR__)}

To {:instructor, " ~> 0.0.5 "} in your livebook.

@Munksgaard
Copy link
Author

Thank you, that works. I realize that changing this in the repo would mean having to update every time there's a new release, but having it like it currently is kind of defeats the purpose, imho. How do other libraries handle this?

@TwistingTwists
Copy link
Contributor

TwistingTwists commented Mar 4, 2024

You can use git source.

{:foobar, git: "https://github.com/elixir-lang/foobar.git"}

@Munksgaard
Copy link
Author

I guess that could work. Explorer does it like this it seems, but I don't know how they make sure the tag is up to date.

@TwistingTwists
Copy link
Contributor

You can put branch name.
{:foobar, git: "https://github.com/elixir-lang/foobar.git", branch: "master"}

@Munksgaard
Copy link
Author

Yeah, either could work. I leave it up to you to choose whether to change anything or just close this issue :-)

@thmsmlr
Copy link
Owner

thmsmlr commented Mar 16, 2024

Yeah.. no solution is great. Using :path like i am currently breaks when you try to import the livebook. Version pegging is tedious when you're developing new examples pre-release. Git suffers from the same issue, but may be the best option since at least you can develop docs against unreleased code, pre-release?

@dewalor
Copy link

dewalor commented Jan 23, 2025

You can use git source.

{:foobar, git: "https://github.com/elixir-lang/foobar.git"}

like this:
{:instructor, git: "https://github.com/thmsmlr/instructor_ex.git", branch: "main"}

@thmsmlr
Copy link
Owner

thmsmlr commented Feb 9, 2025

You can use git source.
{:foobar, git: "https://github.com/elixir-lang/foobar.git"}

like this: {:instructor, git: "https://github.com/thmsmlr/instructor_ex.git", branch: "main"}

I don't hate this, but it still doesn't solve the local development issue. I often am updating the documentation while I'm working on a local commit.

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

4 participants