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
/GutPublic

Working#774

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

Draft
AdminCrystal wants to merge1 commit intobitwes:main
base:main
Choose a base branch
Loading
fromAdminCrystal:notReallyWorkingOutputLength

Conversation

@AdminCrystal
Copy link

No description provided.

@bitwes
Copy link
Owner

bitwes commentedOct 2, 2025
edited
Loading

This is a bit of a gross problem due to how nesteddiff_tool is. The majority of values ingut_config.gd are applied directly togut.gd. This is done ingut_config.gd._apply_options. In some casesgut.gd just holds values thattest.gd will use via itsgut variable, when the test is run. I think this is probably how we would have to do this. Then we'll pass the value along tocomparator.gd which will use it internally and pass it along toget_short_summary.

I see two places where output is being truncated. Wherevercomparator.gd is using its_max_length (which is 100) property anddiff_tool.gd.get_short_summary() (which is hardcoded to 50).get_short_summary could have a default parameter that it would use andcomparator.gd could pass in_max_length (which we should rename).

After a quick look, I think this would work. I've chosentruncate_value_length (overmax_console_output_length). I think it describes how it is used, especially after it is added in the multiple different places. If you come up with something better, you could use that.

  • diff_tool.gd

    • Giveget_short_summary a default paramter that it will use instead of the hardcoded50.
    func get_short_summary(truncate_longer_than=50)
  • comparator.gd

    • Change_max_length totruncate_value_length
    • Passtruncate_value_length to all calls ofget_short_summary.
  • gut.gd

    • Add a property calledtruncate_value_length. Default it to 100.
  • test.gd

    • In_do_ready_stuff (I agree, horrible name, shouldn't be there, see comment) add
    _compare.truncate_value_length = gut.truncate_value_length
  • gut_config.gd

    • Changemax_console_output_length totruncate_value_length
    • In_apply_options add
    gut.truncate_value_length = opts.truncate_value_length

I don't know why I chose 50 fordiff_tool and 100 forcomparator.gd. This change would make the default for both to be 100. That might be too much output, but it is probably fine. I'd have to see it in action.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@AdminCrystal@bitwes

[8]ページ先頭

©2009-2025 Movatter.jp