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

i18n: Fix backtrace when missing input kwarg #9457

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

xclaesse
Copy link
Member

When input kwarg is missing in i18n.merge_file() it was crashing with a
backtrace because of kwargs['input'][0]. That code was useless anyway
because CustomTarget now uses first output as default name which is what
we need here.

When input kwarg is missing in i18n.merge_file() it was crashing with a
backtrace because of kwargs['input'][0]. That code was useless anyway
because CustomTarget now uses first output as default name which is what
we need here.
@xclaesse
Copy link
Member Author

With this PR, test cases/frameworks/6 gettext prints for example: Generating data/test.desktop with a custom command.

@dcbaker
Copy link
Member

dcbaker commented Oct 26, 2021

That's going to to change the name of the target though, right?

@eli-schwartz
Copy link
Member

It still generates the same filename either way... The only part of the ninja rule which is affected is the description field.

@codecov
Copy link

codecov bot commented Oct 26, 2021

Codecov Report

Merging #9457 (df23cb9) into master (abaa980) will decrease coverage by 0.01%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9457      +/-   ##
==========================================
- Coverage   67.31%   67.30%   -0.02%     
==========================================
  Files         396      396              
  Lines       85436    85454      +18     
  Branches    17655    17657       +2     
==========================================
- Hits        57514    57513       -1     
- Misses      23237    23252      +15     
- Partials     4685     4689       +4     
Impacted Files Coverage Δ
mesonbuild/compilers/detect.py 56.35% <25.00%> (-0.24%) ⬇️
mesonbuild/envconfig.py 74.16% <62.50%> (-0.97%) ⬇️
mesonbuild/modules/i18n.py 76.23% <100.00%> (-2.15%) ⬇️
mesonbuild/scripts/vcstagger.py 87.50% <0.00%> (-4.17%) ⬇️
modules/i18n.py 76.23% <0.00%> (-2.15%) ⬇️
envconfig.py 73.20% <0.00%> (-0.89%) ⬇️
compilers/detect.py 41.85% <0.00%> (-0.18%) ⬇️
modules/python.py 63.22% <0.00%> (ø)
mesonbuild/modules/python.py 65.74% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67e8417...df23cb9. Read the comment docs.

@xclaesse
Copy link
Member Author

It change the target name for VS backend, and for "meson compile", but not for ninja which uses the output filename. But we never gave a guarantee how we name targets, especially not stuff like this, IMHO.

@xclaesse
Copy link
Member Author

@dcbaker @eli-schwartz I think this should be fine to merge. Maybe not in stable branch then?

@eli-schwartz eli-schwartz merged commit 018d928 into mesonbuild:master Nov 17, 2021
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