Skip to content

Conversation

@CrownedPhoenix
Copy link

Audits all imports of Dispatch and Foundation to use scoped imports instead of global imports.

I'm doing this as a very non-disruptive bit of lookahead for a hope of getting someday getting GRDB to build for WebAssembly. Been down this road before and Foundation and Dispatch are libraries that have some bits that don't compile well for WASM. My intent with this changeset is to make it easier down the road to identify the symbols and places that need to be #if-def'd around and/or implemented in a WASM-friendly way.

TL;DR This will make dependency pruning down the road much simpler.

Pull Request Checklist

  • CONTRIBUTING: You have read https://github.com/groue/GRDB.swift/blob/master/CONTRIBUTING.md
  • BRANCH: This pull request is submitted against the development branch.
  • DOCUMENTATION: Inline documentation has been updated. (N/A)
  • DOCUMENTATION: README.md or another dedicated guide has been updated. (N/A)
  • TESTS: Changes are tested. (N/A)
  • TESTS: The make smokeTest terminal command runs without failure. (N/A)

@groue
Copy link
Owner

groue commented Nov 7, 2025

Hello @CrownedPhoenix,

Thank you for this pull request!

Does GRDB build for WebAssembly with those changes?

@CrownedPhoenix
Copy link
Author

CrownedPhoenix commented Nov 7, 2025

Does GRDB build for WebAssembly with those changes?

No - or at least I don't think it will (I haven't tried yet because I am pretty sure DispatchQueue won't compile for WASM). This is merely preparatory so that in the future when we (myself or one of my colleagues) come back around to try to get WASM building it will be easier to do the dependency analysis/pruning.

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