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

Missing conversion of hash key in EqualsNode #6803

Merged
merged 1 commit into from
May 23, 2023

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented May 23, 2023

Pull Request Description

Expanding ValuesGenerator to cover also hosted Java maps (to cover #6682 issues) made me realize the HashCodeTest and EqualsTest are failing to convert keys to supported Enso values.

Checklist

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

  • All code follows the
    Java,
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.

@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label May 23, 2023
@JaroslavTulach JaroslavTulach requested a review from 4e6 as a code owner May 23, 2023 05:46
@JaroslavTulach JaroslavTulach self-assigned this May 23, 2023
@JaroslavTulach
Copy link
Member Author

JaroslavTulach commented May 23, 2023

Without the EqualsComplexNode fix there were following faluires:

sbt:runtime> testOnly *HashCodeTest
[error] Test org.enso.interpreter.test.HashCodeTest.hashCodeContractTheory failed: hashCodeContractTheory("JavaObject[{A=1} (java.util.Collections$SingletonMap)]" <from unwrappedValues[63]>, "{1=1}" <from unwrappedValues[51]>), took 0.817 sec
[error] Failed: Total 3, Failed 1, Errors 0, Passed 2

sbt:runtime> testOnly *EqualsTest
[error] Test org.enso.interpreter.test.EqualsTest.equalsOperatorShouldBeSymmetric failed: equalsOperatorShouldBeSymmetric("{1=1}" <from unwrappedValues[51]>, "JavaObject[{A=1} (java.util.Collections$SingletonMap)]" <from unwrappedValues[63]>), took 0.453 sec
[error] Test org.enso.interpreter.test.EqualsTest.equalsNodeCachedIsConsistentWithUncached failed: equalsNodeCachedIsConsistentWithUncached("JavaObject[{A=1} (java.util.Collections$SingletonMap)]" <from unwrappedValues[63]>, "{1=1}" <from unwrappedValues[51]>), took 0.392 sec
[error] Failed: Total 7, Failed 2, Errors 0, Passed 5

these are fixed by converting key to Enso value.

@JaroslavTulach JaroslavTulach merged commit a49743f into develop May 23, 2023
@JaroslavTulach JaroslavTulach deleted the wip/jtulach/MissingConversionOfHashKey branch May 23, 2023 08:10
Procrat added a commit that referenced this pull request May 23, 2023
* develop:
  Use state sent with `GET /directories` instead of querying state separately (#6794)
  Run TypeScript typechecking and eslint on Lint CI (#6603)
  Disable cloud backend for unverified users; use local backend as default backend; minor bugfixes (#6779)
  Reloading file in LS after desynchronization. (#6752)
  Missing conversion of hash key in EqualsNode (#6803)
  feat: set constructor args tag values (#6801)
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.

2 participants