feat: full test coverage on macos & ios, v8 14#28
Open
DjDeveloperr wants to merge 44 commits intomainfrom
Open
feat: full test coverage on macos & ios, v8 14#28DjDeveloperr wants to merge 44 commits intomainfrom
DjDeveloperr wants to merge 44 commits intomainfrom
Conversation
… old runtime tests
- Removed duplicate inclusion of <TargetConditionals.h> in TNSTestNativeCallbacks.h. - Reformatted method calls and assertions in TNSTestNativeCallbacks.m for improved readability. - Updated imports in TestFixtures.h to maintain consistent ordering. - Enhanced RecordTests.js to support both CGRect and NSRect constructors, ensuring compatibility across platforms. - Modified VersionDiffTests.js to handle macOS and iOS version checks more gracefully.
- Introduced ObjCClassMemberOverload structure to manage method overloads. - Updated ObjCClassMember to support multiple overloads and refined member definition logic. - Added jsReadOnlySetter to handle readonly property assignments gracefully. - Enhanced jsCall to resolve method overloads based on argument types. - Implemented URLPattern class in the runtime for URL pattern matching. - Updated metadata generation to include protocol names in category declarations. - Improved duplicate method handling in class member processing.
…lity features - Added support for handling C strings as references in TypeConv. - Improved SInt64 and UInt64 type conversions to handle large integers using BigInt. - Enhanced PointerTypeConv to allow for void pointers and improved handling of struct types. - Introduced new utility functions for managing struct encodings and type definitions. - Implemented compatibility shims for UIColor on macOS to ensure consistent behavior. - Updated timer management in Timers.mm to use mutexes for thread safety and prevent memory leaks. - Enabled reference tests in the TestRunner to ensure proper functionality of reference types.
… and type handling - Enhanced memory management in Timers.mm by simplifying deallocation logic. - Improved CFTypeRef handling in TNSReturnsRetained.m to ensure proper memory ownership semantics. - Added metadata generator support for function return ownership tracking with new flags and attributes. - Implemented vector and complex type handling in TypeSpec and MetadataWriter for better type serialization. - Updated test scripts to ensure metadata generator is built before running tests, enhancing build reliability. - Added utility functions for cursor attribute checks in metadata generation.
There was a problem hiding this comment.
Pull request overview
Updates NativeScript’s Apple builds for V8 14 and improved macOS/iOS testing, while cleaning up legacy V8 headers and hardening parts of the ObjC/FFI bridge.
Changes:
- Removed legacy
v8/include_oldinspector + cppgc public headers and metadata files. - Updated ObjC bridge/FFI codepaths (struct/enum handling, function/block wrapping, lifecycle + caching).
- Reworked Apple V8 linking to consume
libv8_monolith.xcframeworkand added iOS pointer-compression compile defs.
Reviewed changes
Copilot reviewed 89 out of 1316 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| NativeScript/napi/v8/include_old/inspector/Schema.h | Removed legacy generated inspector protocol header. |
| NativeScript/napi/v8/include_old/inspector/Runtime.h | Removed legacy generated inspector protocol header. |
| NativeScript/napi/v8/include_old/inspector/Debugger.h | Removed legacy generated inspector protocol header. |
| NativeScript/napi/v8/include_old/cppgc/type-traits.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/trace-trait.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/testing.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/source-location.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/sentinel-pointer.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/process-heap-statistics.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/prefinalizer.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/platform.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/persistent.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/object-size-trait.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/name-provider.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/macros.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/liveness-broker.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/internal/pointer-policies.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/internal/persistent-node.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/internal/name-trait.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/internal/member-storage.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/internal/logging.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/internal/gc-info.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/internal/finalizer-trait.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/internal/compiler-specific.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/internal/caged-heap.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/internal/caged-heap-local-data.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/internal/base-page-handle.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/internal/atomic-entry-flag.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/internal/api-constants.h | Removed legacy cppgc internal header. |
| NativeScript/napi/v8/include_old/cppgc/heap.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/heap-statistics.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/heap-state.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/heap-handle.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/heap-consistency.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/garbage-collected.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/explicit-management.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/ephemeron-pair.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/default-platform.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/custom-space.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/common.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/allocation.h | Removed legacy cppgc public header. |
| NativeScript/napi/v8/include_old/cppgc/README.md | Removed legacy cppgc documentation. |
| NativeScript/napi/v8/include_old/cppgc/OWNERS | Removed legacy ownership metadata. |
| NativeScript/napi/v8/include_old/cppgc/DEPS | Removed legacy include rules metadata. |
| NativeScript/napi/v8/include_old/OWNERS | Removed legacy ownership metadata. |
| NativeScript/napi/v8/include_old/DIR_METADATA | Removed legacy directory metadata. |
| NativeScript/napi/v8/include_old/DEPS | Removed legacy include rules metadata. |
| NativeScript/napi/v8/include_old/APIDesign.md | Removed legacy V8 API design doc copy. |
| NativeScript/napi/common/native_api_util.h | Fixed argc initialization in callback macro. |
| NativeScript/libffi/macosx-universal/include/ffitarget.h | Adjusted libffi target config and trampoline sizing logic. |
| NativeScript/libffi/macosx-universal/include/ffi.h | Modified vendored libffi public header (types/status/layout). |
| NativeScript/libffi/iphonesimulator-universal/include/ffitarget.h | Adjusted libffi target config and trampoline sizing logic. |
| NativeScript/libffi/iphonesimulator-universal/include/ffi.h | Modified vendored libffi public header (types/status/layout). |
| NativeScript/libffi/iphoneos-arm64/include/ffitarget.h | Adjusted libffi target config macros for ARM64. |
| NativeScript/libffi/iphoneos-arm64/include/ffi.h | Modified vendored libffi public header (types/status/layout). |
| NativeScript/ffi/node_api_util.h | Removed heap allocation from N-API error-info macro. |
| NativeScript/ffi/Variable.mm | Added safer metadata string validation and wider symbol lookup. |
| NativeScript/ffi/Util.mm | Added struct type-encoding discovery and stricter type handling. |
| NativeScript/ffi/TypeConv.h | Added new conversion flags + ffiTypeForArgument() hook. |
| NativeScript/ffi/Struct.mm | Added struct global aliases, equality helper, and safer instance checks. |
| NativeScript/ffi/Protocol.mm | Added protocol name fallback resolution logic. |
| NativeScript/ffi/Object.mm | Added lifecycle association + round-trip reuse improvements. |
| NativeScript/ffi/Object.h | Exposed lifecycle association helper. |
| NativeScript/ffi/ObjCBridge.h | Added round-trip cache frames and initialized refs to null. |
| NativeScript/ffi/JSObject.mm | Fixed bridge-state cleanup ordering on finalize/dealloc. |
| NativeScript/ffi/Interop.h | Extended Pointer/Reference APIs + FunctionReference signature changes. |
| NativeScript/ffi/Enum.mm | Added enum global constants, aliasing, and reverse mapping. |
| NativeScript/ffi/Closure.mm | Added function callback path + NSError out-parameter error mapping. |
| NativeScript/ffi/Closure.h | Extended Closure ctor and added selector field. |
| NativeScript/ffi/ClassMember.h | Added overload representation and readonly setter hook. |
| NativeScript/ffi/ClassBuilder.h | Added multi-descriptor lookup for overload/setter resolution. |
| NativeScript/ffi/Class.mm | Added pointer-arg interop parsing and “alloc then init(...)” flow. |
| NativeScript/ffi/Cif.mm | Added CIF construction from runtime Method and arg-skipping support. |
| NativeScript/ffi/Cif.h | Added new CIF constructors (implicit argc + runtime Method). |
| NativeScript/ffi/CFunction.mm | Adjusted function parsing and return/arg memory ownership flags. |
| NativeScript/ffi/Block.mm | Added block<->JS callback identity cache and signature helpers. |
| NativeScript/ffi/Block.h | Exposed block cache/signature helpers + encoding-based wrapper. |
| NativeScript/CMakeLists.txt | Switched V8 linking to imported xcframework slice + iOS pointer-compression defs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Implement tests to verify the presence and functionality of web globals such as fetch, Headers, Request, Response, WebSocket, and ReadableStream. - Include tests for internal web modules and ensure case-insensitivity in Headers. - Add tests for Request and Response body helpers, fetch URL validation, and WebSocket URL scheme validation. - Introduce tests for Node's fs and node:fs modules, covering file reading/writing, binary data handling, directory operations, and support for both callback and promise forms. - Ensure dynamic import functionality for web and fs modules is tested.
- Removed unnecessary release call for signature in Cif.mm. - Added napi_env member to ObjCBridgeState and initialized it in the constructor. - Implemented cleanup logic for napi references in ObjCBridgeState destructor. - Enhanced v8-module-loader to support package.json "type" field lookups and shebang stripping. - Updated module resolution logic to handle .cjs and .mjs extensions for CommonJS and ESM respectively. - Introduced Path module with methods for path manipulation (basename, dirname, extname, etc.). - Integrated Path module into Node module for seamless usage.
- Added Process.h to define the Process class with methods for CWD, CHDIR, UPTIME, and HRTIME. - Created a CJS module for testing with a simple export. - Introduced .gitignore for ignoring dynamic libraries in node_api tests. - Developed addon.cpp to implement various Node API functionalities including callbacks, threadsafe functions, and error handling. - Added build script for compiling the addon into a dynamic library. - Created cleanup_teardown.js to register teardown hooks and validate cleanup operations. - Implemented reentry_tsfn.js to test callback reentry and threadsafe function behavior. - Added run_teardown_test.sh to automate the testing of cleanup hooks. - Introduced SignatureDispatchEmitter for generating signature dispatch bindings in metadata generation.
…ject - Deleted contents.xcworkspacedata, IDEWorkspaceChecks.plist, and WorkspaceSettings.xcsettings as they are no longer needed. - Removed multiple scheme files: AppWithModules.xcscheme, NativeScript.xcscheme, TKLiveSync.xcscheme, and TestRunner.xcscheme to clean up the project structure.
…te CI workflow to specify main branch and add V8 download step
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.
No description provided.