Skip to content
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

Sort output of File.list #11752

Merged
merged 9 commits into from
Dec 18, 2024
Merged

Sort output of File.list #11752

merged 9 commits into from
Dec 18, 2024

Conversation

GregoryTravis
Copy link
Contributor

@GregoryTravis GregoryTravis commented Dec 3, 2024

Closes #11669.

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.

@GregoryTravis GregoryTravis added the CI: No changelog needed Do not require a changelog entry for this PR. label Dec 3, 2024
@GregoryTravis GregoryTravis marked this pull request as ready for review December 17, 2024 16:10
Copy link
Member

@radeusgd radeusgd left a comment

Choose a reason for hiding this comment

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

Moving sort from Data.list into File.list makes Data.list sorted only when listing local directories, but not S3 nor Cloud.

Please, either bring it back onto Data.list or ensure that the sort is added to other backends.

My rationale for doing it on Data.list was that this was the user facing method and the more internal (S3_|Enso_|)File.list was a bit more low level and used in our internals so the overhead of sorting was not needed there. But perhaps it's good to just keep them consistent - so we probably want to sort everywhere.

@GregoryTravis
Copy link
Contributor Author

@radeusgd I have put sort back in Data.list. This means in some cases, it will sort twice. These lists are often small, but if you think it's a good idea, I can add a no_sort parameter to to File.list.

@radeusgd
Copy link
Member

Hmm, but why do it this way?

This way we are still inconsistent - we sort in File.list but don't sort in Enso_File.list. I think we should either sort in all backends (and then sort in Data.list is no longer needed) or sort in none (and then only sort in Data.list).

I guess sorting in all backends is the way to go.

@GregoryTravis
Copy link
Contributor Author

Sounds good. I've created #11899 for this, since this change needs to go into the release.

@jdunkerley jdunkerley added the CI: Ready to merge This PR is eligible for automatic merge label Dec 18, 2024
@mergify mergify bot merged commit 81d8b98 into develop Dec 18, 2024
37 of 39 checks passed
@mergify mergify bot deleted the wip/gmt/11669-sort-data-list branch December 18, 2024 16:19
jdunkerley pushed a commit that referenced this pull request Dec 18, 2024
(cherry picked from commit 81d8b98)
somebody1234 pushed a commit that referenced this pull request Dec 24, 2024
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. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort results of Data.list alphabetically
3 participants