Skip to content

Conversation

@Akirathan
Copy link
Member

@Akirathan Akirathan commented Oct 8, 2025

Partially fixes #14122

Pull Request Description

Refactors EnsoFile to use java.nio.files.Path instead of TruffleFile.

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@Akirathan Akirathan self-assigned this Oct 8, 2025
@Akirathan Akirathan added the CI: No changelog needed Do not require a changelog entry for this PR. label Oct 8, 2025
@Akirathan Akirathan changed the title EnsoFile uses java.nio.files.Path instead of TruffleFile EnsoFile uses java.nio.files.Path instead of TruffleFile Oct 8, 2025
@Akirathan Akirathan changed the title EnsoFile uses java.nio.files.Path instead of TruffleFile EnsoFile uses java.nio.files.Path instead of TruffleFile Oct 8, 2025
@JaroslavTulach
Copy link
Member

JaroslavTulach commented Oct 9, 2025

Few more truffle boundaries needed... Done in 564907e

@Akirathan Akirathan marked this pull request as ready for review October 9, 2025 10:05
Copy link
Member

@JaroslavTulach JaroslavTulach left a 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).

@Akirathan
Copy link
Member Author

Akirathan commented Oct 13, 2025

The stack trace of java.io.AccessDeniedException on Windows is at https://github.com/enso-org/enso/actions/runs/18405614769/job/52448768751?pr=14126#step:14:6652 when trying to create a directory after it has been recursively deleted. This exception is thrown from

base_dir.create_directory . should_succeed

This exception is happening both in JVM mode and in native mode. On Windows only.

GitHub
Enso Analytics is a self-service data prep and analysis platform designed for data teams. - EnsoFile uses java.nio.files.Path instead of TruffleFile · 78d78b2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: No changelog needed Do not require a changelog entry for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite File to use java.nio.path instead of TruffleFile.

4 participants