Repository navigation
fix(audio-context): build on iOS without @nativescript/canvas - #181
Merged
Merged
Conversation
AudioModule.mm includes the runtime's Runtime.h, whose headers include V8
by bare name ("v8.h"), so an app with only audio-context failed to build
('v8.h' file not found). It only worked when @nativescript/canvas was
installed too, since canvas's build.xcconfig puts Headers/include on the
search path.
audio-context already ships the NativeScriptV8 SwiftPM shim; as in #180 for
canvas-svg, add the shim's Headers/include to the search path and build as
C++20 for V8 14.9.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An app that installs
@nativescript/audio-contextwithout@nativescript/canvasfails to build on iOS:AudioModule.mmincludes the runtime'sRuntime.h, and the runtime headers include V8 by bare name (#include "v8.h"). That only resolves when the V8Headers/includedir is on the search path. Until now, only canvas'sbuild.xcconfigadded it, so the build worked only when canvas was installed too.audio-context already ships the NativeScriptV8 SwiftPM shim. This PR adds the xcconfig half of the canvas-svg fix (87479e1):
Headers/includeas-Iflags. Like canvas, it uses two roots: the installed npm package and this monorepo. The variables are prefixedAUDIO_CONTEXT_so they don't collide with canvas's or svg's.Verification
Syntax-checked
AudioModule.mmwith clang against the iOS simulator SDK, using only the runtime framework and the shim'sHeadersroot (what a standalone app gets):fatal error: 'v8.h' file not founderror: "C++20 or later required."Not yet tested with a full
ns buildof a standalone app.