Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/vuePublic

fix(compiler): skip if guard when condition is empty after modifiers#12321

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
yuwu9145 wants to merge3 commits intovuejs:dev
base:dev
Choose a base branch
Loading
fromyuwu9145:fix-12319

Conversation

yuwu9145
Copy link

@yuwu9145yuwu9145 commentedOct 11, 2021
edited
Loading

fix#12319

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

If adding anew feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

@yuwu9145yuwu9145 marked this pull request as ready for reviewOctober 11, 2021 23:25
@yuwu9145yuwu9145 changed the titlefix(compiler): do not add if guard when condition is emptyfix #12319: Do not add if guard when condition is emptyOct 11, 2021
@yuwu9145yuwu9145 changed the titlefix #12319: Do not add if guard when condition is emptyfix #12319: Do not generate if guard when condition is emptyOct 12, 2021
Copy link
Member

@posvaposva left a comment

Choose a reason for hiding this comment

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

Can you add a test?

yuwu9145 reacted with thumbs up emoji
@posvaposva changed the titlefix #12319: Do not generate if guard when condition is emptyfix(compiler): skip if guard when condition is empty after modifiersOct 12, 2021
@yuwu9145
Copy link
Author

@posva test is added

Copy link
Member

@posvaposva left a comment

Choose a reason for hiding this comment

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

Thanks!

yuwu9145 reacted with heart emoji
Copy link

@dcq01dcq01 left a comment

Choose a reason for hiding this comment

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

Hi! I'm a grad student working on a research project about using large language models to automate code review. Based on your commitb0675cf and the changes in test/unit/modules/compiler/codegen.spec.js, my tool generated this comment:

  1. Null Checks on Event Object: Add a check to ensure that$event is valid before accessing its properties:
  2. if (!$event || !$event.ctrlKey || !$event.shiftKey || !$event.altKey || !$event.metaKey) return null;
  3. Error Handling: Wrap theonClick.apply call in a try-catch block to handle any potential exceptions gracefully.
  4. Test Coverage: Include additional test cases that check for scenarios where one or more modifiers are missing to ensure that the event handler does not execute in those cases.
  5. Edge Cases: Consider edge cases where the event might be triggered without any modifiers or with only some of them. Ensure that the function behaves as expected in those scenarios.
  6. Scalability of Test Cases: Consider creating a parameterized test setup that can iterate over different combinations of modifiers and events to reduce redundancy.

As part of my research, I'm trying to understand how useful these comments are in real-world development. If you have a moment, I'd be super grateful if you could quickly reply to these two yes/no questions:

  1. Does this comment provide suggestions from a dimension you hadn’t considered?
    1. Do you find this comment helpful?

Thanks a lot for your time and feedback! And sorry again if this message is a bother.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@dcq01dcq01dcq01 left review comments

@posvaposvaposva approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

.exact modifier : Failed to generate render function
3 participants
@yuwu9145@posva@dcq01

[8]ページ先頭

©2009-2025 Movatter.jp