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

Fix fromSource behaviour when both stdin and filename #2043

Merged
merged 2 commits into from
May 2, 2023

Conversation

vrom911
Copy link
Contributor

@vrom911 vrom911 commented May 1, 2023

Description

While working on highlight command, I noticed that after format command changes the behaviour of the highlight command when both --stdin option specified and FILENAME is provided is changed.
Instead on returning the result for the stdin input, it started to return empty result.

This PR fixes that behaviour, it will now act exactly as before introducing the changes that came with the format command fixes.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works:
    • smoke test

@vrom911 vrom911 added this to the 0.3.3 milestone May 1, 2023
@vrom911 vrom911 requested review from paulcadman and janmasrovira May 1, 2023 17:05
@vrom911 vrom911 self-assigned this May 1, 2023
Copy link
Collaborator

@janmasrovira janmasrovira left a comment

Choose a reason for hiding this comment

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

Since we are relying on this behaviour for juvix --stdin typecheck FileName.juvix in the emacs mode as well, it'd be nice to add a smoke test for that. Where we check that the file name is indeed part of the error

@jonaprieto jonaprieto force-pushed the vrom911/fix-fromSource-for-stdin-and-file branch from b791cf0 to edc859a Compare May 2, 2023 08:45
@jonaprieto jonaprieto merged commit 935f6fb into main May 2, 2023
@jonaprieto jonaprieto deleted the vrom911/fix-fromSource-for-stdin-and-file branch May 2, 2023 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants