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

Better error message in Data.read when an argument to format is missing #9337

Merged
merged 5 commits into from
Mar 11, 2024

Conversation

radeusgd
Copy link
Member

@radeusgd radeusgd commented Mar 8, 2024

Pull Request Description

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 Mar 8, 2024
@radeusgd radeusgd self-assigned this Mar 8, 2024
@radeusgd
Copy link
Member Author

radeusgd commented Mar 8, 2024

Before:
image

After:
image

Comment on lines 2961 to 2964
Text.from (that : Table) (format:Delimited_Format = Delimited_Format.Delimited '\t') =
File_Format.handle_format_missing_arguments format <| case format of
_ : Delimited_Format -> Delimited_Writer.write_text that format
_ -> Unimplemented.throw "Text.from is currently only implemented for Delimited_Format."
Copy link
Member

Choose a reason for hiding this comment

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

not needed here as the format argument is type checked.
We possibly should remove some of the code from here or the type checking.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh indeed I have missed that.

Hmm, I guess we can keep the typecheck and simplify.

@radeusgd radeusgd added the CI: Ready to merge This PR is eligible for automatic merge label Mar 11, 2024
@mergify mergify bot merged commit 2e35189 into develop Mar 11, 2024
34 of 36 checks passed
@mergify mergify bot deleted the wip/radeusgd/better-read-error-on-missing-arg branch March 11, 2024 14:50
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.

3 participants