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

Generated File "part of" import fix #187

Merged
merged 3 commits into from
Jan 17, 2024

Conversation

cmenkemeller
Copy link
Contributor

This is a bit of an edge case but the resolution should be good for overall generated file consistency.

Issue Replication

Run builder using the following configuration-

  1. output_file_name : localizations.t.dart (note: this is purposefully not set to a .g type file)
  2. output_format : multiple_files

Resulting files will contain error in "part of" section of imports due to a mismatch in file name. Generated file name fails to pull from the custom output_file_name parameter.

Resolution

Update "part of" code generation to use the config output_file_name instead of manually creating file name using baseName

Updates

  1. Added outputFileName as a parameter in GenerateConfig class
  2. Replaced "part of" import with outputFileName
  3. Updated tests to verify

@Tienisto
Copy link
Member

Thank you!

@Tienisto Tienisto merged commit 0fb64ce into slang-i18n:main Jan 17, 2024
3 checks passed
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.

2 participants