-
Notifications
You must be signed in to change notification settings - Fork 334
EnsoFile uses java.nio.files.Path instead of TruffleFile #14126
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
Conversation
EnsoFile uses java.nio.files.Path instead of TruffleFile
EnsoFile uses java.nio.files.Path instead of TruffleFile|
Few more truffle boundaries needed... Done in 564907e |
JaroslavTulach
left a comment
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.
OK, in general. We do want to move away of using TruffleFile, because it makes little sense when one can polyglot java import java.io.File... The primary use of TruffleFile is security and Enso as deliberately given upon any security by opening whole JDK API up.
The Windows failures may be relevant and may deserve to be addressed.
❌ Read XLSX / XLS Files
❌ during read_many, should not mix metadata columns with data columns with same name or when matching by position
An unexpected dataflow error ((Access_Denied (File_Like.Value (File C:\runner_work\enso\enso\test\Table_Tests\data\transient\read_many_test)))) has been matched (at C:\runner_work\enso\enso\test\Table_Tests\src\IO\Read_Many_Spec.enso:452:5-46).
❌ during read_many, should correctly handle empty sheets
An unexpected dataflow error ((Access_Denied (File_Like.Value (File C:\runner_work\enso\enso\test\Table_Tests\data\transient\read_many_test)))) has been matched (at C:\runner_work\enso\enso\test\Table_Tests\src\IO\Read_Many_Spec.enso:452:5-46).
|
The stack trace of
This exception is happening both in JVM mode and in native mode. On Windows only.
|
|
Executing just a single test on Windows that was previously failing (along with some additional log messages) is (surprisingly) OK - https://github.com/enso-org/enso/actions/runs/19165386957/job/54789759488?pr=14126#step:14:914. Let's try to run two consecutive tests - 2adea49
|
There are now some temporary logs.
|
After adding more verbose logs in da7a7a6, running two consecutive tests now mysteriously pass. The More verbose logs revealed, that all the EnsoInputStream and EnsoOutputStream are properly closed. |
|
Since the
|
|
After an investigation, that has taken longer than I expected, I have simply decided that the I think this is OK because end users are unlikely to delete and create the same directory in a tight loop. And if so, and the |
| private with_temp_dir callback = | ||
| base_dir = enso_project.data / "transient" / "read_many_test" | ||
| private with_temp_dir test_name:Text callback = | ||
| base_dir = enso_project.data / "transient" / test_name |
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.
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.
Thanks. I think this is a much more elegant solution. And yes, the problem should go away. Let's merge.
Partially fixes #14122
Pull Request Description
Refactors
EnsoFileto usejava.nio.files.Pathinstead ofTruffleFile.Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
or the Snowflake database integration, a run of the Extra Tests has been scheduled.