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

Unable to test taffy locally due to missing libclang library #428

Closed
Weibye opened this issue Apr 10, 2023 · 4 comments · Fixed by #451
Closed

Unable to test taffy locally due to missing libclang library #428

Weibye opened this issue Apr 10, 2023 · 4 comments · Fixed by #451
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Weibye
Copy link
Collaborator

Weibye commented Apr 10, 2023

taffy version

0596475 and up to current main

Platform

Windows 11 Pro

What you did

run cargo test

What went wrong

Got an error saying that I'm missing libclang:

 --- stderr
  fatal: not a git repository (or any of the parent directories): .git
  fatal: not a git repository (or any of the parent directories): .git
  thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['clang.dll', 'libclang.dll'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', C:\Users\<user>\.cargo\registry\src\github.com-1ecc6299db9ec823\bindgen-0.63.0\./lib.rs:2338:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Additional Information

#337 introduced yoga as a dev-dependency. All commits before that works fine.

Proposed Change

The bug here is that there should be a note in CONTRIBUTING.md if development of the crate depends on specific installed software like what we have with chromedriver for the gentests.

Alternatively construct our development environment in a way that does not rely on external software, but unsure if that is desired or possible.

@Weibye Weibye added bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers labels Apr 10, 2023
@nicoburns
Copy link
Collaborator

Hmm... yoga is only used for benchmarks. I wonder if we could make benchmarks a separate crate and remove the need to compile it just for tests. Otherwise, yes just documenting the need for a C compiler makes sense. The yoga dependency really ought to be optional, but unfortunately cargo doesn't support optional dev dependencies yet rust-lang/cargo#1596

@Weibye
Copy link
Collaborator Author

Weibye commented Apr 10, 2023

make benchmarks a separate crate and remove the need to compile it just for tests

That setup would behave more akin to the current gentest, where its out of the way for anyone contributing until they specifically need to engage with that part of the code.

@Weibye
Copy link
Collaborator Author

Weibye commented Apr 10, 2023

I just noticed it is also preventing me from running any examples 🙃

@nicoburns
Copy link
Collaborator

Hmm... I definitely think we ought to make benchmarks their own crate. It's just not acceptable for people to need a C compiler to run tests or examples. It'll make running benchmarks slightly less convenient (I don't think we'll be able to hook it up to cargo bench). But that's not really a big deal.

@nicoburns nicoburns removed the documentation Improvements or additions to documentation label Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants