Skip to content

Add FileSystemTools as built-in tools#1762

Merged
vorburger merged 3 commits intoenola-dev:mainfrom
temi-ro:issue-1631
Sep 20, 2025
Merged

Add FileSystemTools as built-in tools#1762
vorburger merged 3 commits intoenola-dev:mainfrom
temi-ro:issue-1631

Conversation

@temi-ro
Copy link
Contributor

@temi-ro temi-ro commented Sep 19, 2025

Relates to | Fixes #1631
I want to mention that I have difficulties to run ./test.bash due to error with symbolic links. Apparently I have broken symlinks.
Btw to build the enola I had to modify build-excejar.bash to create soft symlink otherwise I had a cross-device error (I didn't stage the changes of build-excejar.bash).
Perhaps you can help me with the code.

  • ./test.bash passes locally
  • Appropriate changes to documentation are included in the PR

@google-cla
Copy link

google-cla bot commented Sep 19, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@temi-ro temi-ro marked this pull request as ready for review September 19, 2025 19:26
@vorburger
Copy link
Member

vorburger commented Sep 20, 2025

I want to mention that I have difficulties to run ./test.bash due to error with symbolic links. Apparently I have broken symlinks.
Btw to build the enola I had to modify build-excejar.bash to create soft symlink otherwise I had a cross-device error (I didn't stage the changes of build-excejar.bash).

Yeah, and the fact that you weren't able to run ./test.bash is why the automated code formatters etc. didn't run, and that's what's causing a build failure for the Continous Integration (CI) on GitHub Actions. (You can see the exact failure by clicking on what's red above, you might have to expand it, first.)

Let's fix that, first? I'll help you! Can you clarify your environment? Are you locally on... what, Windows, with WSL, probably? Or... "pure" Windows? Cygwin? We will need WSL set-up and running, otherwise it's going to be impossible, as likely too time consuming. But with WSL, I'm fairly confident that this should be possible hopefully, because that's basically "Linux on Windows". (I should probably document that more clearly, BTW.)

First of all, did you see https://docs.enola.dev/dev/setup? Did you install and do you have nix working?

How about this: Before we continue with this PR, let's focus on just you being able to run ./test.bash on the main branch, as-is. Feel free to create separate new issues about any problems that you run into with that, and we'll solve them. THEN, once that fully works, let's pick this PR up? (Because once you have a working development enviromment and can test the main branch, then it will be very easy to fix what's currently still blocking this.) Sounds like a plan?

BTW: I'm in the middle of simplifying the build scripts and process; watch also e.g. #1763 and #1759. So you should git pull the latest and greatest main branch, every time you work. And then (later, after you're good on main), you'll also want to frequently git rebase your issue-1631 branch for this PR. Hope that makes sense?

Perhaps you can help me with the code.

I look forward to fully code reviewing it, once there is a "green build" and CI passed.

It IMHO makes more sense to hold back any actual code review feedback until we have that.

But from a very first glance, this looks very interesting and useful to me, as a 1st step, so let's get it "green", and take it from there.

@temi-ro
Copy link
Contributor Author

temi-ro commented Sep 20, 2025

Thank you for your quick answer! I think it is also a better idea to first fix my setup. Nix is working, I can run ./enola.
I am on Ubuntu 22.04.5 LTS and I use VSCode (using a Dev Container).

When I run ./test.bash, it says ./test.bash: line 27: statix: command not found , but even if I comment the line, it prints my broken symlinks:

  3451889      0 lrwxrwxrwx   1 codespace codespace       10 Sep 17 18:14 ./.venv/bin/python -> python3.12
  3451888      4 lrwxrwxrwx   1 codespace codespace       74 Sep 17 18:14 ./.venv/bin/python3.12 -> /nix/store/bbyp6vkdszn6a14gqnfx8l5j3mhfcnfs-python3-3.12.11/bin/python3.12
  3451890      0 lrwxrwxrwx   1 codespace codespace       10 Sep 17 18:14 ./.venv/bin/python3 -> python3.12

@vorburger
Copy link
Member

use VSCode

FYI to work on the Java code, https://docs.enola.dev/dev/ide/ recommends using IntelliJ.

Or did you get the Bazel integration with VSC working? I haven't tried it in a while.

(using a Dev Container)

FYI I've not used this in a while, I'm not sure how well it currently works.

When I run ./test.bash, it says ./test.bash: line 27: statix: command not found

Ah, but then you didn't "enter the Nix build environment with nix develop to have the same tools available", probably? Start your shell, do nix develop, and THEN run ./test.bash - that should work better. (I'll simplify this in #1653.)

PS: I'm going AFK, and will reply next in a few hours.

@temi-ro
Copy link
Contributor Author

temi-ro commented Sep 20, 2025

I also tried from the terminal directly, but I also have broken symlinks, but at least the statix is found!

@vorburger
Copy link
Member

but even if I comment the line, it prints my broken symlinks:

  3451889      0 lrwxrwxrwx   1 codespace codespace       10 Sep 17 18:14 ./.venv/bin/python -> python3.12
  3451888      4 lrwxrwxrwx   1 codespace codespace       74 Sep 17 18:14 ./.venv/bin/python3.12 -> /nix/store/bbyp6vkdszn6a14gqnfx8l5j3mhfcnfs-python3-3.12.11/bin/python3.12
  3451890      0 lrwxrwxrwx   1 codespace codespace       10 Sep 17 18:14 ./.venv/bin/python3 -> python3.12

I'd would simply try to rm -rf .venv/.

Does that help?

Copy link
Member

@vorburger vorburger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@temi-ro I think this is fine, for an initial version; I'll LGTM, and merge.

We can follow-up in future PRs to refine it.

@vorburger vorburger merged commit 7bf8a68 into enola-dev:main Sep 20, 2025
14 checks passed
@vorburger
Copy link
Member

PS: I should have squash merged this, but forgot; will do next time.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filesystem available as a built-in tool

2 participants