Skip to content

fix(metadata-generator): Improve detection of static frameworks#1177

Merged
mbektchiev merged 1 commit intomasterfrom
bektchiev/fix-mg-static-frameworks-detection
Jul 30, 2019
Merged

fix(metadata-generator): Improve detection of static frameworks#1177
mbektchiev merged 1 commit intomasterfrom
bektchiev/fix-mg-static-frameworks-detection

Conversation

@mbektchiev
Copy link
Copy Markdown
Contributor

  • System frameworks (with .tbd files) were wrongly being flagged
    as static, because isStaticFramework returned a
    no_such_file_or_directory error
  • Single architecture dynamic libraries were wrongly being flagged
    as static, because isStaticFramework returned an
    invalid_argument error
  • Single architecture static libraries were accidentally being flagged
    as static, because isStaticFramework returned an
    invalid_argument error
  • Remove TODO comment as irrelevant (no crashes in debug mode)
  • Add a debug-time assert for errors returned by isStaticFramework

PR Checklist

What is the current behavior?

In the binary metadata some modules' flags were incorrectly written.

What is the new behavior?

The detection of whether a module is dynamic framework or not has been improved

Additional context

Issue was discovered while debugging the causes of #1061 (comment)

@mbektchiev mbektchiev added the bug label Jul 26, 2019
@mbektchiev mbektchiev requested review from vmutafov and vtrifonov July 26, 2019 13:58
@mbektchiev mbektchiev self-assigned this Jul 26, 2019
@cla-bot cla-bot Bot added the cla: yes label Jul 26, 2019
* Modules with .tbd files which weren't detected as system were
wrongly being flagged as static, because `isStaticFramework`
returned a `no_such_file_or_directory` error. (e.g. `Accelerate`)
* Single architecture dynamic libraries were wrongly being flagged
as static, because `isStaticFramework` returned an
`invalid_argument` error (e.g. `MetalPerformanceShaders`)
* Single architecture static libraries were accidentally being flagged
as static, because `isStaticFramework` returned an
`invalid_argument` error
* Remove TODO comment as irrelevant (no crashes in debug mode)
@mbektchiev mbektchiev force-pushed the bektchiev/fix-mg-static-frameworks-detection branch from bdf0efd to 9b89830 Compare July 29, 2019 13:41
@mbektchiev mbektchiev merged commit edc6e94 into master Jul 30, 2019
@mbektchiev mbektchiev added this to the 6.1.0 milestone Jul 30, 2019
@mbektchiev mbektchiev deleted the bektchiev/fix-mg-static-frameworks-detection branch July 30, 2019 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants