Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/microsoft-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: PR
on:
pull_request:
types: [opened, synchronize, edited]
branches: [ "main", "*-stable", "release/*" ]
branches: [ "main", "*-stable", "release/*", "*-merge" ]

concurrency:
# Ensure single build of a pull request. `main` should not be affected.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ - (RCTPlatformView *)betterHitTest:(CGPoint)point withEvent:(UIEvent *)event //

BOOL isPointInside = [self pointInside:point withEvent:event];

UIView *currentContainerView = self.currentContainerView;
RCTPlatformView *currentContainerView = self.currentContainerView; // [macOS]

BOOL clipsToBounds = false;

Expand Down Expand Up @@ -1045,19 +1045,19 @@ - (BOOL)styleWouldClipOverflowInk
// `blur` applied, we need to wrap it in a SwiftUI view to render the effect.
// In this case, `effectiveContentView` will be the content view inside the
// SwiftUI wrapper.
- (UIView *)effectiveContentView
- (RCTPlatformView *)effectiveContentView // [macOS]
{
if (!ReactNativeFeatureFlags::enableSwiftUIBasedFilters()) {
return self;
}

UIView *effectiveContentView = self;
RCTPlatformView *effectiveContentView = self; // [macOS]

if (self.styleNeedsSwiftUIContainer) {
if (_swiftUIWrapper == nullptr) {
_swiftUIWrapper = [RCTSwiftUIContainerViewWrapper new];
UIView *swiftUIContentView = [[UIView alloc] init];
for (UIView *subview = nullptr in self.subviews) {
RCTPlatformView *swiftUIContentView = [[RCTPlatformView alloc] init]; // [macOS]
for (RCTPlatformView *subview = nullptr in self.subviews) { // [macOS]
[swiftUIContentView addSubview:subview];
}
swiftUIContentView.clipsToBounds = self.clipsToBounds;
Expand All @@ -1074,8 +1074,8 @@ - (UIView *)effectiveContentView
effectiveContentView = _swiftUIWrapper.contentView;
} else {
if (_swiftUIWrapper != nullptr) {
UIView *swiftUIContentView = _swiftUIWrapper.contentView;
for (UIView *subview = nullptr in swiftUIContentView.subviews) {
RCTPlatformView *swiftUIContentView = _swiftUIWrapper.contentView; // [macOS]
for (RCTPlatformView *subview = nullptr in swiftUIContentView.subviews) { // [macOS]
[self addSubview:subview];
}
self.clipsToBounds = swiftUIContentView.clipsToBounds;
Expand All @@ -1096,7 +1096,7 @@ - (UIView *)effectiveContentView
// the view and is not affected by clipping.
- (RCTUIView *)currentContainerView // [macOS]
{
UIView *effectiveContentView = self.effectiveContentView;
RCTPlatformView *effectiveContentView = self.effectiveContentView; // [macOS]

if (_useCustomContainerView) {
if (!_containerView) {
Expand Down Expand Up @@ -1357,7 +1357,7 @@ - (void)invalidateLayer
if (primitive.type == FilterType::DropShadow) {
if (_swiftUIWrapper != nullptr && std::holds_alternative<DropShadowParams>(primitive.parameters)) {
const auto &dropShadowParams = std::get<DropShadowParams>(primitive.parameters);
UIColor *shadowColor = RCTUIColorFromSharedColor(dropShadowParams.color);
RCTPlatformColor *shadowColor = RCTUIColorFromSharedColor(dropShadowParams.color); // [macOS]
[_swiftUIWrapper updateDropShadow:@(dropShadowParams.standardDeviation)
x:@(dropShadowParams.offsetX)
y:@(dropShadowParams.offsetY)
Expand Down Expand Up @@ -2409,7 +2409,7 @@ - (BOOL)styleNeedsSwiftUIContainer
return NO;
}

- (void)transferVisualPropertiesFromView:(UIView *)sourceView toView:(UIView *)destinationView
- (void)transferVisualPropertiesFromView:(RCTPlatformView *)sourceView toView:(RCTPlatformView *)destinationView // [macOS]
{
// shadow
destinationView.layer.shadowColor = sourceView.layer.shadowColor;
Expand Down Expand Up @@ -2457,6 +2457,7 @@ - (void)transferVisualPropertiesFromView:(UIView *)sourceView toView:(UIView *)d
}
}

#if !TARGET_OS_OSX // [macOS] macOS provides its own focus/blur implementation in the TARGET_OS_OSX block above
- (BOOL)canBecomeFirstResponder
{
return YES;
Expand Down Expand Up @@ -2512,6 +2513,7 @@ - (BOOL)resignFirstResponder

return YES;
}
#endif // [macOS]

@end

Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ yoga-proguard-annotations = "1.19.0"
boost="1_83_0"
doubleconversion="1.1.6"
fastFloat="8.0.0"
fmt="11.0.2"
fmt="12.1.0" # [macOS]
folly="2024.11.18.00"
glog="0.3.5"
gflags="2.2.0"
Expand Down
5 changes: 3 additions & 2 deletions packages/react-native/react-native.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ if (apple) {
},
projectConfig: apple.getProjectConfig({platformName: 'macos'}),
dependencyConfig: apple.getProjectConfig({platformName: 'macos'}),
npmPackageName: require('./scripts/codegen/generate-artifacts-executor/constants')
.REACT_NATIVE,
npmPackageName:
require('./scripts/codegen/generate-artifacts-executor/constants')
.REACT_NATIVE,
};
}
// macOS]
Expand Down
26 changes: 12 additions & 14 deletions packages/react-native/scripts/ios-prebuild/hermes.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ type HermesEngineSourceType =
const HermesEngineSourceTypes /*:{
+DOWNLOAD_PREBUILD_TARBALL: "download_prebuild_tarball",
+DOWNLOAD_PREBUILT_NIGHTLY_TARBALL: "download_prebuilt_nightly_tarball",
+LOCAL_PREBUILT_TARBALL: "local_prebuilt_tarball"
+LOCAL_PREBUILT_TARBALL: "local_prebuilt_tarball",
+BUILD_FROM_HERMES_COMMIT: "build_from_hermes_commit" // [macOS]
} */ = {
LOCAL_PREBUILT_TARBALL: 'local_prebuilt_tarball',
DOWNLOAD_PREBUILD_TARBALL: 'download_prebuild_tarball',
Expand Down Expand Up @@ -439,22 +440,20 @@ async function buildFromHermesCommit(
const HERMES_GITHUB_URL = 'https://github.com/facebook/hermes.git';
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'hermes-build-'));
const hermesDir = path.join(tmpDir, 'hermes');
const inheritStdio = {stdio: 'inherit'};
Comment thread
Saadnajmi marked this conversation as resolved.

try {
// Clone Hermes at the identified commit using the most efficient
// single-fetch pattern (see https://github.com/actions/checkout)
hermesLog(`Cloning Hermes at commit ${commit}...`);
execSync(`git init "${hermesDir}"`, inheritStdio);
execSync(
`git -C "${hermesDir}" remote add origin ${HERMES_GITHUB_URL}`,
inheritStdio,
);
execSync(`git init "${hermesDir}"`, {stdio: 'inherit'});
execSync(`git -C "${hermesDir}" remote add origin ${HERMES_GITHUB_URL}`, {
stdio: 'inherit',
});
execSync(
`git -C "${hermesDir}" fetch --no-tags --depth 1 origin +${commit}:refs/remotes/origin/main`,
{...inheritStdio, timeout: 300000},
{stdio: 'inherit', timeout: 300000},
);
execSync(`git -C "${hermesDir}" checkout main`, inheritStdio);
execSync(`git -C "${hermesDir}" checkout main`, {stdio: 'inherit'});

const reactNativeRoot = path.resolve(__dirname, '..', '..');
const buildScript = path.join(
Expand All @@ -480,7 +479,7 @@ async function buildFromHermesCommit(

hermesLog(`Building Hermes frameworks (${buildType})...`);
execSync(`bash "${buildScript}"`, {
...inheritStdio,
stdio: 'inherit',
cwd: hermesDir,
timeout: 3600000, // 60 minutes
env: buildEnv,
Expand All @@ -490,10 +489,9 @@ async function buildFromHermesCommit(
const tarballName = `hermes-ios-${buildType.toLowerCase()}.tar.gz`;
const tarballPath = path.join(artifactsPath, tarballName);
hermesLog('Creating Hermes tarball from build output...');
execSync(
`tar -czf "${tarballPath}" -C "${hermesDir}" destroot`,
inheritStdio,
);
execSync(`tar -czf "${tarballPath}" -C "${hermesDir}" destroot`, {
stdio: 'inherit',
});

hermesLog(`Hermes built from source and packaged at ${tarballPath}`);
return tarballPath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Pod::Spec.new do |spec|
spec.dependency "DoubleConversion"
spec.dependency "glog"
spec.dependency "fast_float", "8.0.0"
spec.dependency "fmt", "11.0.2"
spec.dependency "fmt", "12.1.0" # [macOS]
spec.compiler_flags = '-Wno-documentation -faligned-new'
spec.source_files = 'folly/String.cpp',
'folly/Conv.cpp',
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native/third-party-podspecs/fmt.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ fmt_git_url = fmt_config[:git]

Pod::Spec.new do |spec|
spec.name = "fmt"
spec.version = "11.0.2"
spec.version = "12.1.0" # [macOS]
spec.license = { :type => "MIT" }
spec.homepage = "https://github.com/fmtlib/fmt"
spec.summary = "{fmt} is an open-source formatting library for C++. It can be used as a safe and fast alternative to (s)printf and iostreams."
spec.authors = "The fmt contributors"
spec.source = {
:git => fmt_git_url,
:tag => "11.0.2"
:tag => "12.1.0" # [macOS]
}
spec.pod_target_xcconfig = {
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
Expand Down
Loading
Loading