Skip to content

Conversation

@GregoryTravis
Copy link
Contributor

@GregoryTravis GregoryTravis commented Dec 29, 2025

Added a test-only accessor.

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 marked this pull request as ready for review December 29, 2025 20:07
@GregoryTravis GregoryTravis added the CI: No changelog needed Do not require a changelog entry for this PR. label Dec 29, 2025
@GregoryTravis GregoryTravis changed the title Fix Private_Access_Error in Ordered_Multi_Value_Key Fix Private_Access_Error in Ordered_Multi_Value_Key Dec 29, 2025
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.

Please hide (if it is not possible to remove) test only APIs.

## ---
private: true
---
java_column_test_only self = self.java_column
Copy link
Member

Choose a reason for hiding this comment

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

  • Can this test only method be move outside of API exposed by from Standard.Table import all, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How can that be done without a non-private method in this file?

Copy link
Member

@JaroslavTulach JaroslavTulach Dec 31, 2025

Choose a reason for hiding this comment

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

  • The method can be in any other file/module in this project
  • Especially suitable are files/module not re-exported from Main.enso
  • then, when one types from Standard.Table import all one doesn't get such file/module and its test_only_java_column method in the "all" imports
    • some call such a not-all API a veil API
  • there is for example distribution/lib/Standard/Table/0.0.0-dev/src/Internal/In_Memory_Visualization_Helpers.enso ...
  • having distribution/lib/Standard/Table/0.0.0-dev/src/Internal/In_Memory_Test_Only_Helpers.enso would be a nice choice from my point of view as well
  • btw. this line of thought is opposite to the other one - should this be implemented the other one is void

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I didn't realize an internal module could be used for this.

compare_ordered_keys make_key table compare_keys

run_java table =
java_columns = table.columns.map column-> (column:In_Memory_Column).java_column_test_only
Copy link
Member

Choose a reason for hiding this comment

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

  • Why are benchmarks accessing internals of memory table?
  • Shouldn't we benchmark end-user functionality and not internals?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should benchmark anything whose performance we want to track. There is no direct end-user use of the multi-value keys, but they should still be benchmarked. I don't think it makes sense to convert a benchmark to Java just to remove a hidden but non-private accessor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see that we have any benchmarks of code in std-bits, but sometimes we do need it. This is that case.

Copy link
Member

@JaroslavTulach JaroslavTulach Dec 31, 2025

Choose a reason for hiding this comment

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

  • Wouldn't it be easier to run the test/Benchmarks with --disable-private-checks then? E.g.
sbt:enso> runEngineDistribution --run test/Benchmarks --disable-private-check
  • that would be way better than to spoil the API consumed by Enso users just because of internal benchmarking in my architect's view of the affairs
  • if so, then just expand Internal tests run with --disable-private-check #10743 to recognize test/Benchmarks and modify std-benchmarks runner to disable private checks as well
  • btw. this line of thought is opposite to the other one - should this be implemented the other one is void

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.

3 participants