-
Notifications
You must be signed in to change notification settings - Fork 146
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
StrictXmir
throws "Premature end of file."
#3684
Comments
@yegor256 Could you take a look, please? |
@volodya-lombrozo what is in this file? |
@yegor256 Hope it will help: |
@volodya-lombrozo this is very strange, since the XSD is valid. The exception message means that the file has zero length (this is usually what this exception means). Are you sure the file is not deleted while application is still running? |
@yegor256 I don't modify this file in any way. I also archive the file structure in case of an error. You can download it here. As you can see, the file |
@maxonfjvipon I have no idea why this may happen, maybe you can help? |
@yegor256 it seems to me that the problem in the path: |
@yegor256 this is what ChatGTP is saying about these slashes: ![]() Here we have four:
|
@maxonfjvipon without triple slash it doesn't work on Windows, b/c this path is wrong for Saxon: |
@yegor256 then the logic should be different for different OSs |
@maxonfjvipon pay attention, all tests work now, in |
@yegor256 I think the test is not good enough because it just checks you concatenates absolute path with slashes correctly inside |
@yegor256 this is what ChatGPT is saying about windows local path: ![]() ![]() The drive ( |
@maxonfjvipon no matter how we format the file path, the tests work -- Saxon finds the file. However, it doesn't find the file in JEO project. This is the problem. |
@maxonfjvipon what I mean is that existing tests not only check the formatting of the file path. They actually run Saxon, letting it find the file. |
@maxonfjvipon @yegor256 Have you checked this one? It's a critical blocker. |
@maxonfjvipon should be easy to fix, please use |
@yegor256 I've just written a simple unit test with @Test
@ExtendWith(MktmpResolver.class)
@ExtendWith(WeAreOnline.class)
void doesNotFailInMultipleThreads(@Mktmp final Path tmp) {
final XML xml = StrictXmirTest.xmir("https://www.eolang.org/XMIR.xsd");
Assertions.assertDoesNotThrow(
new Together<>(
thread -> new StrictXmir(xml).validate()
)::asList
);
} And I'm getting this : Any idea what it means? UPD. Full log:
|
@maxonfjvipon this means exactly what we are trying to catch. Try this, it will work:
|
@maxonfjvipon the easiest fix would be to make |
@yegor256 yes, it works |
@yegor256 @maxonfjvipon Please, don't do this. This will significantly decrease the performance of |
@maxonfjvipon a more fine-grained solution would be to make |
@yegor256 yes, I understand, I'll try |
…ther bug(#3684): Added synchronization in StrictXmir
@rultor release, tag is |
@volodya-lombrozo try 0.49.2 please |
I have updated eo to
0.49.1
andStrictXmir
now gives me the following error:The exception doesn't tell anything about the
xmir
that causes exception. Here is the full log:build.log
The text was updated successfully, but these errors were encountered: