-
Notifications
You must be signed in to change notification settings - Fork 111
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
LibGit2 integration and tracking subdirs of Julia #104
Conversation
Think I got it. Added a line ccall((:giterr_clear, :libgit2), Cvoid, ()) # necessary to avoid errors like "the global/xdg file 'attributes' doesn't exist: No such file or directory" before doing |
5c06d0f
to
0acd403
Compare
Codecov Report
@@ Coverage Diff @@
## master #104 +/- ##
==========================================
- Coverage 91.23% 85.18% -6.06%
==========================================
Files 6 8 +2
Lines 331 378 +47
==========================================
+ Hits 302 322 +20
- Misses 29 56 +27
Continue to review full report at Codecov.
|
8526344
to
9f65139
Compare
OK, this seems to be working. For the stdlibs you need JuliaLang/julia#27759. @maleadt, any interest in testing this? I haven't tried an out-of-tree build, and I think you mentioned you had. |
prefix = subdir[length(repo_path)+2:end] # git-relative path of this subdir | ||
tree = git_tree(repo, Base.GIT_VERSION_INFO.commit) | ||
files = Iterators.filter(file->startswith(file, prefix), keys(tree)) | ||
ccall((:giterr_clear, :libgit2), Cvoid, ()) # necessary to avoid errors like "the global/xdg file 'attributes' doesn't exist: No such file or directory" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into this more but I think this is pointing to a LibGit2 issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Details on the issue have been filed with libgit2. As a fix for the Julia LibGit2 library I've proposed JuliaLang/julia#27763 which should cleanly work around the issue. For now your giterr_clear
solution will work just fine.
Thanks for taking over! Tracking
The REPL is gloriously broken after this:
Doesn't seem like it picked up tracking the stdlib:
|
Hmm, works just fine for me; I used it heavily to develop several recent Julia PRs. (Note that currently this may segfault-on-exit due to JuliaLang/julia#28306.) Not quite sure how to go about debugging this. |
This is a rebased & extended version of #91 (CC @maleadt). The goal is to provide the means to track both
Core.Compiler
and the stdlibs, thus fixing #63.UPDATE: the rest of this post is outdated, but it is retained for posterity
However, I'm encountering a strange LibGit2-related error, and I'm wondering if @omus might have any insights. The issue is that I can't replicate an error if I run what appears to be the same code from the REPL.
Here's the error:
That line is here. Now let's try it manually:
I don't understand what would cause it to work at the REPL and fail in code. Some kind of race condition? I added a
sleep
in a random location but that didn't seem to help.