-
Notifications
You must be signed in to change notification settings - Fork 57
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
Fix topCommandInputFile for Format command #2063
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jonaprieto
requested changes
May 9, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add a smoke test that reflects that the issue is fixed. At leat, I didn't find it. For example, checking something like this gives a 0 exit code.
juvix format --in-place examples/milestone/TicTacToe/CLI/TicTacToe.juvix
9 tasks
jonaprieto
approved these changes
May 10, 2023
4 tasks
jonaprieto
added a commit
that referenced
this pull request
May 19, 2023
…#2057) This PR resolves a few bugs in the Makefile targets for formatting and type checking Juvix files, which were preventing the capture of type checking errors for our examples and bad formatting for all the Juvix files in the repository. With this PR, our code should now be clean, and we can expect every file to be properly formatted and type checked. Changes made: - [x] Updated `make format-juvix-files` - [x] Updated `make check-format-juvix-files` - [x] Formatted all Juvix files - [x] Comment a fragment in `examples/milestone/Bank/Bank.juvix` In the future, we will drastically simplify the Makefile once we improve the `format` and the `type check` command for example posted here: - #2066 - #2087 Related: - #2063 - #2040 (due to some typechecking errors we're not capturing before) - #2105 - #2059
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks to @paulcadman , we figured out that the behaviour of the
format
command described in issue #2058 was due to the way theuniplates
library was handling theFormatOptions
. AsFormatOption
doesn't have theAppPath FileOrDir
, it was not set up to anything, therefore, the directory was not properly set.This change, instead of changing the
FormatOptions
data type to have someAppPath *
, it just adds the special case on how to handle this specific command to figure out its input directory.For the future, we might think of either refactoring the whole uniplates logic, or handling each command the way that I am handling the
format
command at the moment, so it is more explicit and consistent.Let me know what you think!
Type of change
Checklist: