Skip to content

Inline _compile_module_args#13

Merged
aherrmann merged 14 commits intomercuryfrom
refactor
Jun 13, 2024
Merged

Inline _compile_module_args#13
aherrmann merged 14 commits intomercuryfrom
refactor

Conversation

@aherrmann
Copy link
Copy Markdown

_compile_module_args was only used once and did no longer properly encapsulate the generation of compiler args for module compilation.

Inlining the function revealed several opportunities to remove duplicate code.

A possible next step is to factor out arguments that are shared across all modules and generate them outside of the loop over modules.

  • Inline _compile_module_args
  • Remove duplicate compile_cmd object
  • Inline compile_args_for_file
  • Remove indirection for srcs
  • Remove CompileArgsInfo
  • Remove intermediate CompileResultInfo
  • Remove unused field type variant
  • inline packages_info.exposed_package_modules
  • Remove redundant branch
  • TODO note
  • Remove redundant intermediate variable
  • remove inline markers
  • remove redundant modname
  • Remove unused variable

@aherrmann aherrmann requested a review from avdv June 12, 2024 14:39
Copy link
Copy Markdown

@avdv avdv left a comment

Choose a reason for hiding this comment

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

Nice!

@aherrmann aherrmann merged commit 9b0089d into mercury Jun 13, 2024
@aherrmann aherrmann deleted the refactor branch June 13, 2024 08:25
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