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
dependency errors #5319
Comments
From @MARTIMMHi, I get the following error more often than before after some edits in my Missing or wrong version of dependency A remedy to this is to touch all source files in the library I work on This is Rakudo version 2016.04-200-gad82657 built on MoarVM version Greetings, |
From @LLFournI've been getting something similar and I've managed to golf it. mkdir lib; summary: Precomp is broken for dependency chains 3 or longer when one of Do we have a way of writing tests for precomp? On Tue, May 17, 2016 at 4:23 AM mt1957 <perl6-bugs-followup@perl.org> wrote:
|
The RT System itself - Status changed from 'new' to 'open' |
From @LLFournerr leme try that again Precomp is broken for dependency chains 3 or longer when one of the To expand: Sometimes it gives you a problem where you get "Missing or wrong On Fri, May 20, 2016 at 11:18 PM Lloyd Fournier <lloyd.fourn@gmail.com>
|
From @LLFournIt seems to have been introduced by one of nine's commits on the 13th. This On Fri, May 20, 2016 at 11:26 PM Lloyd Fournier <lloyd.fourn@gmail.com>
|
From @ninerCommitted a fix in c59e4dc44772cb09edeb8aa7f0ce0385f951cf5d Would be extremely helpful if you could translate your excellent test case into a proper spec test :) |
From @LLFournnine++ has attempted to fix this issue: Though it seems to have made the failure more random. Try the following: gives me: (Two One) I wrote a test and push it to roast. It seems to have the same issue. On Sat, May 21, 2016 at 1:45 AM Lloyd Fournier <lloyd.fourn@gmail.com>
|
From @ninerSorry, I cannot reproduce the new failure here. precompilation.rakudo.moar passed 150 consecutive times and your shell script printed (Two One) 500 times in a row before I stopped them. |
From @LLFournI've done some more investigation. There are two seperate issues: 1. The main issue wrt this ticket. It hits you will you are editing code. P6="perl6" while true; do ==== (Top2 Needed Top1) This one is different because the content of the file has to actually 2. A smaller issue which is what I was investigating in the prior response. This race condition essentially happens in this line in !load-dependencies: return False if not $srcIO.e or $modified <= $srcIO.modified; because it's <= it opens the possibility that a precomp is marked as out of On Sun, May 22, 2016 at 7:12 AM Lloyd Fournier <lloyd.fourn@gmail.com>
|
From @ninerOn Sun May 22 17:14:16 2016, lloyd.fourn@gmail.com wrote:
This sounds worrisome. I have no idea why that should make a difference. Will try to debug it anyway.
The consequence should be that we just needlessly recompile the file, even though it has just been compiled successfully, i.e. a bit of harmless waste of time. If we compared with < it could happen that the source was modified in the same second as the old version was precompiled and we miss the update. Will have to think those interactions through one more time. |
From @LLFournwrt to outdating files. What I would actually expect from looking at the my $handle = ( 1. File changes at timestamp X After a few "note"s around the place the above seems to be what is On Mon, May 23, 2016 at 10:13 AM Lloyd Fournier <lloyd.fourn@gmail.com>
|
From @MARTIMMHi, Another symptom from the same bug. After modifying a sub module I get an Type 'Semi-xml::Sxml' is not declared Then, after modifying the top module (just a simple say), everything This is Rakudo version 2016.04-209-gdb10a01 built on MoarVM version Greetings, |
From @ninerJust a quick heads up: I've managed to reproduce the errors with the second test.sh script by running it on a vfat file system. That increases my suspicion that it's caused by coarse time stamps. At least one issue, as there could be several. |
From @ninerI fear I have to rewrite the whole dependency loading code. Right now we try to load a precomp file, during loading of the dependencies notice that one of them changed, precompile the source again and load the result. Sometimes compilation is so fast that it finishes in the same Instant (with just 2 second resolution on crappy file systems) as the dependency's. Then we declare it outdated though we just precompiled it and try to load from source. Problem is that we really don't know which of them is older when the time stamps match, so we cannot rely on the target module being fresher even though we just compiled it ourselves. Someone else could have recompiled the dependency in the meantime. All of this was much easier when we locked the whole precomp store during module loading. But a global lock is a luxury we just cannot afford :) The solution will probably be to first check all dependencies, then open all dependencies' files, then check again and only if they still check out actually pass them to the CompUnit::Loader. If they don't check out again, rinse and repeat. |
From @ninerCould you please try the rt128156_fix_precomp_deps_validation branch? It contains a possible fix. |
From @FROGGSI've got the following files: ~/dev/rakudo/test$ tree . $ cat A.pm $ cat B.pm $ cat C.pm When I run this code once: All is fine... But when I run it again after adding an empty line to |
From @LLFournThis is covered in: https://rt.perl.org/Public/Bug/Display.html?id=128156 On Tue, Jun 7, 2016 at 6:24 AM Tobias Leich <perl6-bugs-followup@perl.org>
|
The RT System itself - Status changed from 'new' to 'open' |
From @LLFournI've tested both issues with the branch: issue #1 (changing dependency contents leads to goofed re-precomp) -- Still for reference another example of issue #1 was reported recently: https://rt.perl.org/Public/Bug/Display.html?id=128332 On Tue, May 24, 2016 at 8:17 PM mt1957 <mt1957@gmail.com> wrote:
|
From @LLFournanother one: https://rt.perl.org/Public/Bug/Display.html?id=128156 On Tue, Jun 7, 2016 at 9:29 PM Lloyd Fournier <lloyd.fourn@gmail.com> wrote:
|
From @LLFournhttps://rt.perl.org/Public/Bug/Display.html?id=128371 rather On Sat, Jun 11, 2016 at 8:38 AM Lloyd Fournier <lloyd.fourn@gmail.com>
|
From @ninerI've golfed the test case for changing a dependency: cat test.sh |
From @FROGGSThese patches fix and test the remaining issue: |
1 similar comment
From @FROGGSThese patches fix and test the remaining issue: |
@FROGGS - Status changed from 'open' to 'resolved' |
From @LLFourn@FROGGS for me that test passes with Tests for that: \o/ precomp works again. Thanks all! On Mon, Jun 13, 2016 at 3:22 AM Tobias Leich via RT <
|
Migrated from rt.perl.org#128156 (status was 'resolved')
Searchable as RT128156$
The text was updated successfully, but these errors were encountered: