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

Improve Non_Unique_Primary_Key error, split file format detection into read/write, improve SQLite format detection #6604

Merged
merged 14 commits into from
May 9, 2023

Conversation

radeusgd
Copy link
Member

@radeusgd radeusgd commented May 8, 2023

Pull Request Description

Closes #6437
Related to #6410

  • Add example duplicate row to Non_Unique_Primary_Key.
  • Ensure File.read fails if the file does not exist, always.
  • Ensure SQLite fails if file is empty or nonexistent or malformed.
  • Split file format detection into read and write modes, so that the read mode can depend on actual file contents.

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,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@radeusgd radeusgd added the CI: No changelog needed Do not require a changelog entry for this PR. label May 8, 2023
@radeusgd radeusgd self-assigned this May 8, 2023
@radeusgd radeusgd force-pushed the wip/radeusgd/6437-better-non-unique-pk-error branch from 689f008 to f927d28 Compare May 8, 2023 21:34
@@ -25,7 +25,7 @@ spec =
list = ArrayList.new
list.add 432
list.get 0 . should_equal 432
Test.specify "should report missing method error on Java Arrays" <|
Test.specify "should report missing method error on Java Arrays" pending="Failing due to #6609" <|
Copy link
Member Author

Choose a reason for hiding this comment

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

This test started failing since I changed Vector/Array to_display_text to rely on short_display_text. I decided it will be easier to temporarily disable this test on which we don't rely that much, instead of introducing a workaround to the code.

If disabling that test is a big issue, I could revert to_display_text change and rely on short_display_text directly in my error handling code. However, I think the to_display_text change was long overdue anyway, so it's better to have a small test disabled and get it re-enabled once #6609 is fixed.

cc: @JaroslavTulach

@radeusgd radeusgd force-pushed the wip/radeusgd/6437-better-non-unique-pk-error branch from f927d28 to 9e8fd57 Compare May 9, 2023 08:48
test/Tests/src/System/File_Read_Spec.enso Outdated Show resolved Hide resolved
@radeusgd radeusgd added the CI: Ready to merge This PR is eligible for automatic merge label May 9, 2023
@radeusgd radeusgd force-pushed the wip/radeusgd/6437-better-non-unique-pk-error branch from eb0de47 to e6a8bfc Compare May 9, 2023 16:20
@mergify mergify bot merged commit d8b9269 into develop May 9, 2023
@mergify mergify bot deleted the wip/radeusgd/6437-better-non-unique-pk-error branch May 9, 2023 17:15
Procrat added a commit that referenced this pull request May 10, 2023
* develop: (28 commits)
  Add tests for Date.until, Date.next and Date.previous. (#6606)
  Improve `Non_Unique_Primary_Key` error, split file format detection into read/write, improve SQLite format detection (#6604)
  tokenize_to_columns or parse_to_columns results in a single column we shouldn't add the  1 (#6607)
  Fix node editing race condition (#6594)
  Add format to the in-memory Column (#6538)
  Fix dashboard issues (part 2) (#6511)
  Fix visualisation type selector artifacts rendered after node preview visualisation was closed. (#6575)
  Revert typescript CI Lint changes (#6602)
  Fix the Engine version check in GUI (#6570)
  Show error pop-up when failing to rename a project (#6366)
  Small changes from Book Club issues (#6533)
  "at_least_one" flag for tokenize_to_rows (#6539)
  Benchmark Engine job runs only engine, not Enso benchmarks (#6534)
  Catch 5813 and avoid crash (#6585)
  Fix opening links in desktop IDE (#6507)
  Identify SyntaxError exception and avoid printing a stack trace (#6574)
  Fix dashboard issues (#6502)
  Let ChangesetBuilder.invalidated search even container elements (#6548)
  Fix #5075: stop panning on full-screen visualisation (#6530)
  Only `Join_Kind.Inner` removes the common-named columns (#6564)
  ...
Procrat added a commit that referenced this pull request May 10, 2023
…ing-6287

* develop:
  Fix issues with missing sourcemaps (#6572)
  Fix asset delete; implement project delete and project rename (#6566)
  Fix #6377: Change ctrl-r shortcut (#6620)
  Add tests for Date.until, Date.next and Date.previous. (#6606)
  Improve `Non_Unique_Primary_Key` error, split file format detection into read/write, improve SQLite format detection (#6604)
  tokenize_to_columns or parse_to_columns results in a single column we shouldn't add the  1 (#6607)
  Fix node editing race condition (#6594)
  Add format to the in-memory Column (#6538)
  Fix dashboard issues (part 2) (#6511)
  Fix visualisation type selector artifacts rendered after node preview visualisation was closed. (#6575)
  Revert typescript CI Lint changes (#6602)
  Fix the Engine version check in GUI (#6570)
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.

Include indices of duplicate rows in the Non_Unique_Primary_Key error
3 participants