profile
viewpoint
Andrew Coates acoates-ms @Microsoft WA Microsoft

facebook/react-native 92043

A framework for building native apps with React.

microsoft/react-native-windows 12965

A framework for building native Windows apps with React.

microsoft/fluentui 9921

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.

facebook/hermes 5839

Hermes is a small and lightweight JavaScript engine optimized for running React Native on Android.

callstack/haul 3441

Haul is a command line tool for developing React Native apps, powered by Webpack

microsoft/react-native-macos 1496

A framework for building native macOS apps with React.

facebook/react-native-website 1279

The site and docs for React Native

react-native-community/discussions-and-proposals 1041

Discussions and proposal related to the main React Native project

microsoft/fluent-ui-react 380

An ecosystem for building highly customizable enterprise class user interfaces.

microsoft/beachball 84

The Sunniest Semantic Version Bumper

issue commentmicrosoft/react-native-windows

E2E test: Clicking on hyperlinks crashes test app

The inlines that are involved in the links are created outside react native, they're created in code by the C# app directly, so they will not have RNW tags. The RNW should be resilient to dealing with elements not created by the framework as apps can mix and match XAML and RNW content

kmelmon

comment created time in 2 hours

issue openedmicrosoft/react-native-windows

JsUpToDateCheck created at the root of the drive

Creating directory "\JsUpToDateCheck\vnext\node_modules\ws". Copying file from "D:\a\1\s\packages\react-native-windows-init\package.json" to "D:\JsUpToDateCheck\packages\react-native-windows-init\package.json.dummy". Copying file from "D:\a\1\s\vnext\package.json" to "D:\JsUpToDateCheck\vnext\package.json.dummy". Copying file from "D:\a\1\s\vnext\node_modules\ws\package.json" to "D:\JsUpToDateCheck\vnext\node_modules\ws\package.json.dummy". Creating directory "\JsUpToDateCheck\vnext\src\babel-plugin-codegen". Copying file from "D:\a\1\s\vnext\src\babel-plugin-codegen\package.json" to "D:\JsUpToDateCheck\vnext\src\babel-plugin-codegen\package.json.dummy". Touching "\JsUpToDateCheck\yarn.lock.dummy". Touching "\JsUpToDateCheck\package.json.dummy". Touching "\JsUpToDateCheck\packages@react-native-windows\cli\node_modules\xmldom\package.json.dummy". Touching "\JsUpToDateCheck\packages@react-native-windows\cli\package.json.dummy". Touching "\JsUpToDateCheck\packages@react-native-windows\cli\src\e2etest\projects\BarPackage\package.json.dummy". Touching "\JsUpToDateCheck\packages@react-native-windows\cli\src\e2etest\projects\FooPackage\pa

created time in 3 hours

issue openedmicrosoft/react-native-windows

Could not copy package.json.dummy in CI

Lots of FS contention in CI runs:

##[warning]Directory.Build.targets(43,5): Warning MSB3026: Could not copy "C:\a\1\s\packages\react-native-platform-override\node_modules\braces\package.json" to "C:\a\1\s\\vnext\\build\JsUpToDateCheck\packages\react-native-platform-override\node_modules\braces\package.json.dummy". Beginning retry 1 in 1000ms. The process cannot access the file 'C:\a\1\s\\vnext\\build\JsUpToDateCheck\packages\react-native-platform-override\node_modules\braces\package.json.dummy' because it is being used by another process. 

https://dev.azure.com/ms/react-native-windows/_build/results?buildId=126324&view=logs&j=1e181896-1839-5e51-5c05-797b2ae792b3&t=c5fa9d7c-258b-5c3a-dd65-f3b6426ffcc4&l=2551

created time in 3 hours

issue commentmicrosoft/react-native-windows

Error: Unable to resolve module `./debugger-ui/ui.e31bb0bc.js` from ``: ./debugger-ui/ui.e31bb0bc.js could not be found within the project.

yeah. there's some sort of network error, but I can't diagnose it because of the debugger error. and clearing my browser cache didn't help. I deleted node_modules and yarn lock (you can see from pushes), yet the issue remains so I don't understand what is wrong. I have setup a proxy server for the URL and set mode: 'cors', so i'm not sure why the fetch is giving an error.

goatandsheep

comment created time in 7 hours

issue openedmicrosoft/react-native-windows

useWindowDimensions hook always returns fixed values

<!-- Your issue will be triaged by the RNW team according to this process: https://github.com/microsoft/react-native-windows/wiki/Triage-Process -->

Environment

Run the following in your terminal and copy the results here.

  1. npx react-native --version: 4.13.1
  2. npx react-native info: System: OS: Windows 10 10.0.18363 CPU: (12) x64 Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz Memory: 24.39 GB / 47.91 GB Binaries: Node: 12.9.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.10.2 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: AllowDevelopmentWithoutDevLicense: Enabled AllowAllTrustedApps: Enabled Versions: 10.0.18362.0 IDEs: Android Studio: Not Found Visual Studio: 16.8.30711.63 (Visual Studio Professional 2019), 15.9.28307.344 (Visual Studio Community 2017) Languages: Java: Not Found Python: 3.8.6 npmPackages: @react-native-community/cli: ^4.13.1 => 4.13.1 react: 16.13.1 => 16.13.1 react-native: 0.63.3 => 0.63.3 react-native-windows: ^0.63.0-0 => 0.63.11 npmGlobalPackages: react-native: Not Found

<!-- Consider including this information as well: What SDK version are you building for?

  • Target Platform Version(s): 10.0.18362 What device(s) are you targeting?
  • Target Device(s): Desktop Which version of Visual Studio are you using?
  • Visual Studio Version: Visual Studio 2019 Which build configuration are you running?
  • Build Configuration: Debug -->

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Create RN App and use UseWindowDimensions hook
import { Text, View, useWindowDimensions } from 'react-native';

const App = () => {
    const dimensions = useWindowDimensions()
    console.log(dimensions.width)
    console.log(dimensions.height)

    return (
            <View>
                <Header />
                <LoginComponent />
                <View style={{flex: 1, flexDirection: 'row'}}>
                    <SideMenu />
                    <MainBody />
                </View>
            </View>
    )
}
  1. Resize application window. Logged dimensions are always 1200 for width and 900 for height, regardless of actual window size.

Expected Results

Dimesnions would update as window size changes.

<!-- Troubleshooting If you see build failure on react-native run-windows, please try again with 'react-native run-windows --logging' and provide the output. -->

Snack, code example, screenshot, or link to a repository:

Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

created time in 10 hours

issue openedmicrosoft/react-native-windows

Bundling should not re-run when no changes to JS files

react-native bundle should collect a list of the JS files it traversed and that list fed into the MakeBundle inputs so that we can skip bundling when there are no JS changes

created time in 14 hours

issue openedmicrosoft/react-native-windows

Cannot build release e2eTest in Visual Studio

In VS, OutDir is a relative path for C# projects, e.g. bin\x86\Release

    <BundleSourceMapDir Condition="'$(BundleSourceMapDir)' == ''">$([MSBuild]::NormalizePath('$(OutDir)\sourcemaps\react'))</BundleSourceMapDir>

Therefore BundleSourceMapDir ends up wrongly pointing under the VS install dir

created time in 14 hours

push eventmicrosoft/react-native-windows

Vladimir Morozov

commit sha 932eb5f017589480d6848e58b689d43ee12bef87

Fix destruction of UIManager in UI thread (#6680) * Fix destruction of UIManager in UI thread * Change files

view details

push time in 17 hours

PR merged microsoft/react-native-windows

Reviewers
Fix destruction of UIManager in UI thread AutoMerge Backport to 0.63 Approved Request Backport to 0.64

This PR is to augment the fix in PR #6321 where we wanted to make that the UIManager is destroyed from UI thread. We are still getting reports that code crashes because the UIManager is destroyed in a background thread. It happens because in the code below the m_uiQueue is already stopped and as a result we still destroy the UIManager in a BG thread instead of UI queue.

m_uiQueue->runOnQueue([manager = std::move(m_manager)]() {});

To address this issue we must take the underlying DispatchQueue which is not affected by the MessageQueueThread stop condition and use it to destroy the UIManager:

std::static_pointer_cast<Mso::React::MessageDispatchQueue>(m_uiQueue)
    ->DispatchQueue()
    .Post([manager = std::move(m_manager)]() noexcept {});

The fix must be propagated back to 0.63 to unblock our customers.

Microsoft Reviewers: Open in CodeFlow
+13 -1

2 comments

2 changed files

vmoroz

pr closed time in 17 hours

PR opened microsoft/react-native-windows

Fix certificate to match publisher name which is causing PFN to mismatch

Fixes #6684

During #6125, the publisher name was updated but the certificate wasn't re-created. As a result we were left with a package family name that didn't match the publisher name, which broke the assumptions on where the app would get deployed. This resulted in a build time warning that was easily missed (package publisher does not match certificate file or something like that). As a result, the tree dump files could not be found at the expected location and would therefore not be published.

+9 -9

0 comment

7 changed files

pr created time in 18 hours

pull request commentmicrosoft/react-native-windows

Use MsBuilds nuget restore operation in CI rather than separate nuget restore command

Update .ado/jobs/universal.yml too?

dannyvv

comment created time in 18 hours

issue commentmicrosoft/react-native-windows

CI Loop: tree dump comparison file not being uploaded as artifacts

https://dev.azure.com/ms/react-native-windows/_build/results?buildId=126297&view=logs&j=d748dad3-a0b7-5fdb-711c-b2cdfdfc24a4&t=927661ef-c977-523f-48c0-326d34d7e9ac&l=9

found 0 files
Finishing: Copy tree dump output files

This is because the publisher was changed in #6125 which changed the Package Family name. We should be careful when updating things like app name/PFN since it has downstream implications like this one.

kmelmon

comment created time in 18 hours

pull request commentmicrosoft/react-native-windows

Use MsBuilds nuget restore operation in CI rather than separate nuget restore command

I think this means we can also remove the NuGetTool steps

dannyvv

comment created time in 19 hours

push eventmicrosoft/react-native-windows

Nick Gerleman

commit sha bad8fe175ffe24b8c33c85fee7fda61e3a9c9050

Use whitespace insensitive compare for identical override detection (#6660) * Use whitespace insensitive compare for indentical override detection Fixes #6575 * Change files * PR feedback

view details

push time in 19 hours

issue closedmicrosoft/react-native-windows

"Identical Override" Detection Should be Whitespace Insensitive Instead of Line Ending Insensitive

Override tooling can detect if file no longer contains changes compared to upstream and prompts to remove the file. This can happen when merging in changes that are identical to what we patched.

For non-binary files we do a line-ending insensitive comparison. Due to differences in prettier version, or merge artifacts, we will sometimes introduce other whitespace changes but have semantically identical files.

We should change the line-ending insensitive comparison to be whitespace insensitive.

closed time in 19 hours

NickGerleman

push eventmicrosoft/react-native-windows

dannyvv

commit sha d5922eec4026745338546de8f5115cf29d78e0e8

Split out Universal build in Build and Test (#6678) * Split out Universal build in Build and Test and have the Build run on the windev build agents * Change files

view details

push time in 19 hours

PR merged microsoft/react-native-windows

Reviewers
Split out Universal build in Build and Test

This PR updates the PR validation step for the 'Universal' build.

  • It splits out the Build and the Test steps.
  • It runs the Build phase on the new windevbuild agents and the tests on the old Hosted agents
    • While for universal alone overall it would probably be faster to run the test at the same time as the build, but the build now runs on the windevbuild agents which don't support UI tests. So overall the build completes faster
  • To run tests as soon as the build unblocks this change uses Azure Devops templating infrastructure to expand the build matrix rather than the build-in matrix expansion. which would only start the first test after the last build completes. This injects a step 'UniversalBuild' to allow other jobs to wait on this one.

This allows the nuget tests to wait un just the right builds as well. But that is for later work.

Microsoft Reviewers: Open in CodeFlow
+299 -167

0 comment

13 changed files

dannyvv

pr closed time in 19 hours

push eventmicrosoft/react-native-windows

Nick Gerleman

commit sha 56d2170d526548052de30c3648d40cc47e683a6e

Integrate 12/2 Nightly Build (#6663) * Initial auto-integrate * Update Metro configs to be compatible with new version * Disable Desktop ITs * Integrate 12/2 Nightly Build Commits: https://github.com/facebook/react-native/compare/19d4cc2d4...c901c1fbc Interesting changes for us are changes to accomadate the new version of Metro borught in by the CLI, ScrollResponder fixes, bundling changes when using Hermes. There were a whole bunch of ScrollView changes but I don't think any of them should affect us. Wanting to take a closer look at ViewConfig refactoring soon since I think more may be exposed than previously. * What happened here... * Change files * Fix versions * Change files

view details

push time in 19 hours

PR merged microsoft/react-native-windows

Integrate 12/2 Nightly Build AutoMerge

Commits: https://github.com/facebook/react-native/compare/19d4cc2d4...c901c1fbc

Interesting changes for us are changes to accommodate the new version of Metro brought in by the CLI, ScrollResponder fixes, bundling changes when using Hermes. New metro also breaks windesktop/desktop integration tests. Need to figure out what to do there.

There were a whole bunch of ScrollView changes but I don't think any of them should affect us.

Wanting to take a closer look at ViewConfig refactoring soon since I think more may be exposed than previously.

Microsoft Reviewers: Open in CodeFlow
+525 -850

1 comment

43 changed files

NickGerleman

pr closed time in 19 hours

push eventmicrosoft/react-native-windows

Nick Gerleman

commit sha 92ed26927664ee91fb7447b0b3ba67fab410ed74

Ensure windows script added on init (#6661) * Ensure windows script added on init Fixes #5931 At some point we started only re-installing RN dependencies in generator if the package peer dependencies were unsatisfied. This missed some logic grouped in to also modify package.json to add a windows script. This change fixes that, and does some refactoring to use package utils, and not create messages that w're doing a yarn install when we don't in the module project unmet peer dependency case. Still need to validate this * Change files * Fix path * PR feedback

view details

push time in 19 hours

PR merged microsoft/react-native-windows

Ensure windows script added on init Area: Infrastructure AutoMerge

Fixes #5931

At some point we started only re-installing RN dependencies in generator if the package peer dependencies were unsatisfied. This missed some logic grouped in to also modify package.json to add a windows script.

This change fixes that, and does some refactoring to use package utils, and not create messages that we're doing a yarn install when we don't in the module project unmet peer dependency case.

Still need to validate this

Microsoft Reviewers: Open in CodeFlow
+39 -37

1 comment

4 changed files

NickGerleman

pr closed time in 19 hours

issue closedmicrosoft/react-native-windows

react-native-windows-init/generator-windows should add "windows" script

After running react-native-windows-init against a recent build with --useDevMode, we add dependencies to package.json, but don't add a windows script. We're instead left with:

  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },

Our own packages add:

    "windows": "react-native run-windows",

closed time in 19 hours

NickGerleman

Pull request review commentmicrosoft/react-native-windows

Split out Universal build in Build and Test

-parameters:-  - name: buildEnvironment-    type: string-    default : PullRequest-    values: -     - PullRequest -     - Continuous -   -jobs:-  - job: Universal-    variables:-      - template: ../variables/vs2019.yml-    displayName: Universal-    dependsOn:-     - Setup-    condition: ne( dependencies.Setup.outputs['checkPayload.shouldSkipPRBuild'], 'True' )-    strategy:-      matrix: # Why we only build some flavors: https://github.com/microsoft/react-native-windows/issues/4308-        # Start Continuous only-        ${{ if eq(parameters.buildEnvironment, 'Continuous') }}:-          ArmDebug:-            BuildConfiguration: Debug-            BuildPlatform: ARM-        # End Continuous only-        ArmRelease:-          BuildConfiguration: Release-          BuildPlatform: ARM-        # Start Continuous only-        ${{ if eq(parameters.buildEnvironment, 'Continuous') }}:-          Arm64Debug:-            BuildConfiguration: Debug-            BuildPlatform: ARM64-          Arm64Release:-            BuildConfiguration: Release-            BuildPlatform: ARM64-          X64Debug:-            BuildConfiguration: Debug-            BuildPlatform: x64-        # End Continuous only-        X64Release:-          BuildConfiguration: Release-          BuildPlatform: x64-        X86Debug:-          BuildConfiguration: Debug-          BuildPlatform: x86-          LayoutHeaders: true-        # Start Continuous only-        ${{ if eq(parameters.buildEnvironment, 'Continuous') }}:-          X86Release:-            BuildConfiguration: Release-            BuildPlatform: x86-        # End Continuous only-    pool:-      vmImage: $(VmImage)-    timeoutInMinutes: 60-    cancelTimeoutInMinutes: 5+  parameters:+    - name: buildEnvironment+      type: string+      default : PullRequest+      values: +      - PullRequest +      - Continuous +    - name: buildMatrix+      type: object+      default:+        - BuildEnvironment: PullRequest+          Matrix:+            - BuildConfiguration: Release+              BuildPlatform: ARM+            - BuildConfiguration: Release+              BuildPlatform: x64+            - BuildConfiguration: Debug+              BuildPlatform: x86+              LayoutHeaders: true+        - BuildEnvironment: Continuous+          Matrix:+            - BuildConfiguration: Debug+              BuildPlatform: ARM+            - BuildConfiguration: Release+              BuildPlatform: ARM+            - BuildConfiguration: Debug+              BuildPlatform: ARM64+            - BuildConfiguration: Release+              BuildPlatform: ARM64+            - BuildConfiguration: Debug+              BuildPlatform: x64+            - BuildConfiguration: Release+              BuildPlatform: x64+            - BuildConfiguration: Debug+              BuildPlatform: x86+              LayoutHeaders: true+            - BuildConfiguration: Release+              BuildPlatform: x86+      +  jobs:+    - ${{ each config in parameters.buildMatrix }}:+      - ${{ if eq(config.BuildEnvironment, parameters.buildEnvironment) }}:+        - ${{ each matrix in config.Matrix }}:+            - job: UniversalBuild${{ matrix.BuildPlatform }}${{ matrix.BuildConfiguration }}+              variables:+                - template: ../variables/vs2019.yml+              displayName: Universal Build ${{ matrix.BuildPlatform }}${{ matrix.BuildConfiguration }}+              dependsOn:+                - Setup+              condition: ne( dependencies.Setup.outputs['checkPayload.shouldSkipPRBuild'], 'True' )+              pool: windevbuildagents+              timeoutInMinutes: 60+              cancelTimeoutInMinutes: 5 -    steps:-      - checkout: self-        clean: false-        submodules: false+              steps:+                - checkout: self+                  clean: false+                  submodules: false -      - task: PowerShell@2-        displayName: "Check if this environment meets the development dependencies"-        inputs:-          targetType: filePath-          filePath: $(Build.SourcesDirectory)\vnext\Scripts\rnw-dependencies.ps1-          arguments: -NoPrompt -Tags buildLab+                - template: ../templates/build-rnw.yml+                  parameters:+                    yarnBuildCmd: build+                    project: vnext/Microsoft.ReactNative.sln+                    buildPlatform: ${{ matrix.BuildPlatform }}+                    buildConfiguration: ${{ matrix.BuildConfiguration }}+                    multicoreBuild: true -      - template: ../templates/build-rnw.yml-        parameters:-          yarnBuildCmd: build-          project: vnext/Microsoft.ReactNative.sln+                - task: PublishPipelineArtifact@1+                  displayName: "Publish binaries for testing"+                  inputs:+                    targetPath: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }}+                    artifactName: "Universal-${{ matrix.BuildPlatform }}-${{ matrix.BuildConfiguration }}" -      - powershell: |-          Write-Debug "Using expression $($env:GOOGLETESTADAPTERPATHEXPRESSION)"-          Write-Host "##vso[task.setvariable variable=GoogleTestAdapterPath]$(Invoke-Expression $env:GOOGLETESTADAPTERPATHEXPRESSION)"-          Write-Host "Set environment variable to ($env:GoogleTestAdapterPath)"-        displayName: Set GoogleTestAdapterPath+                - template: ../templates/publish-build-artifacts-for-nuget.yml+                  parameters:+                    artifactName: ReactWindows+                    buildPlatform: ${{ matrix.BuildPlatform }}+                    buildConfiguration: ${{ matrix.BuildConfiguration }}+                    layoutHeaders: eq('true', variables.LayoutHeaders)+                    contents: |+                      Microsoft.ReactNative\**+                      Microsoft.ReactNative.Managed\**+                      Microsoft.ReactNative.Managed.CodeGen\**+                +                - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0+                  displayName: 'Component Governance Detection'+                  inputs:+                    alertWarningLevel: Medium+                    scanType: 'Register' -      - task: VSTest@2-        displayName: Run Universal Unit Tests (Native)-        timeoutInMinutes: 5 # Set smaller timeout , due to hangs-        inputs:-          testSelector: testAssemblies-          testAssemblyVer2: |-            Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.exe-            Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.exe-            Mso.UnitTests/Mso.UnitTests.exe-          pathtoCustomTestAdapters: $(GoogleTestAdapterPath)-          searchFolder: $(Build.SourcesDirectory)/vnext/target/$(BuildPlatform)/$(BuildConfiguration)-          runTestsInIsolation: true-          platform: $(BuildPlatform)-          configuration: $(BuildConfiguration)-          publishRunAttachments: true-          collectDumpOn: onAbortOnly-          vsTestVersion: latest-        condition: and(succeeded(), not(startsWith(variables.BuildPlatform, 'arm')))+                +            - job: UniversalTest${{ matrix.BuildPlatform }}${{ matrix.BuildConfiguration }}+              variables:+                - template: ../variables/vs2019.yml+              displayName: Universal Test ${{ matrix.BuildPlatform }}${{ matrix.BuildConfiguration }}+              dependsOn:+                - UniversalBuild${{ matrix.BuildPlatform }}${{ matrix.BuildConfiguration }}+              condition: +                and+                (+                  ne( dependencies.Setup.outputs['checkPayload.shouldSkipPRBuild'], 'True' ),+                  in(dependencies.UniversalBuild${{ matrix.BuildPlatform }}${{ matrix.BuildConfiguration }}.result, 'Succeeded', 'SucceededWithIssues', 'Skipped')+                )+              pool:+                vmImage: $(VmImage)+              timeoutInMinutes: 60+              cancelTimeoutInMinutes: 5 -      - task: VSTest@2-        displayName: Run Universal Unit Tests (UWP)-        timeoutInMinutes: 5 # Set smaller timeout , due to hangs-        inputs:-          testSelector: testAssemblies-          testAssemblyVer2: |-            Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.build.appxrecipe-          searchFolder: $(Build.SourcesDirectory)/vnext/target/$(BuildPlatform)/$(BuildConfiguration)-          runTestsInIsolation: true-          platform: $(BuildPlatform)-          configuration: $(BuildConfiguration)-          publishRunAttachments: true-          codeCoverageEnabled: true-          collectDumpOn: onAbortOnly-          vsTestVersion: latest-        condition: and(succeeded(), not(startsWith(variables.BuildPlatform, 'arm')))+              steps:+                - checkout: self+                  clean: false+                  submodules: false -      - task: VSTest@2-        displayName: Run Universal Unit Tests (NetCore)-        timeoutInMinutes: 5 # Set smaller timeout , due to hangs-        inputs:-          testSelector: testAssemblies-          testAssemblyVer2: |-            Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.dll-          searchFolder: $(Build.SourcesDirectory)/vnext/target/$(BuildPlatform)/$(BuildConfiguration)-          runTestsInIsolation: true-          platform: $(BuildPlatform)-          configuration: $(BuildConfiguration)-          publishRunAttachments: true-          codeCoverageEnabled: true-          collectDumpOn: onAbortOnly-          vsTestVersion: latest-        condition: and(succeeded(), eq(variables.BuildPlatform, 'x64'))+                - task: PowerShell@2+                  displayName: "Check if this environment meets the development dependencies"+                  inputs:+                    targetType: filePath+                    filePath: $(Build.SourcesDirectory)\vnext\Scripts\rnw-dependencies.ps1+                    arguments: -NoPrompt -Tags buildLab+                    +                - template: ../templates/prepare-env.yml+                  parameters:+                    yarnBuildCmd: build -      - template: ../templates/publish-build-artifacts-for-nuget.yml-        parameters:-          artifactName: ReactWindows-          layoutHeaders: eq('true', variables.LayoutHeaders)-          contents: |-            Microsoft.ReactNative\**-            Microsoft.ReactNative.Managed\**-            Microsoft.ReactNative.Managed.CodeGen\**-      -      - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0-        displayName: 'Component Governance Detection'-        inputs:-          alertWarningLevel: Medium-          scanType: 'Register'\ No newline at end of file+                - task: NuGetCommand@2+                  displayName: NuGet restore+                  inputs:+                    command: restore+                    restoreSolution: vnext/Microsoft.ReactNative.sln+                    feedsToUse: config+                    nugetConfigPath: $(Build.SourcesDirectory)/vnext/NuGet.config+                    restoreDirectory: packages/+                    verbosityRestore: Detailed # Options: quiet, normal, detailed+                    +                - task: DownloadPipelineArtifact@1+                  displayName: "Download binaries for testing"+                  inputs:+                    targetPath: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }}+                    artifactName: "Universal-${{ matrix.BuildPlatform }}-${{ matrix.BuildConfiguration }}"++                # The WinDevBuild Agents run on the c-drive and the hosted agents run on the d-drive.+                # Some of the output files have the c-drive expanded in the outputs, which results in file not found errors when running tests+                # This script fixes those files to point to the d-drive of the hosted agents.+                # We unfortunately can't run the tests on the WinDev  build pool because it lacks UI support+                - powershell: |+                    Get-ChildItem *.appxrecipe -recurse | ForEach { (Get-Content -Path $_) -replace "c:\\a\\1\\s", "$(System.DefaultWorkingDirectory)" | Set-Content -Path $_ }+                  displayName: Fix Paths in appx files to deal with different enlistments between agent types.++                - powershell: |+                    Write-Debug "Using expression $($env:GOOGLETESTADAPTERPATHEXPRESSION)"+                    Write-Host "##vso[task.setvariable variable=GoogleTestAdapterPath]$(Invoke-Expression $env:GOOGLETESTADAPTERPATHEXPRESSION)"+                    Write-Host "Set environment variable to ($env:GoogleTestAdapterPath)"+                  displayName: Set GoogleTestAdapterPath++                - task: VSTest@2+                  displayName: Run Universal Unit Tests (Native)+                  timeoutInMinutes: 5 # Set smaller timeout , due to hangs+                  inputs:+                    testSelector: testAssemblies+                    testAssemblyVer2: |+                      Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.exe+                      Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.exe+                      Mso.UnitTests/Mso.UnitTests.exe+                    pathtoCustomTestAdapters: $(GoogleTestAdapterPath)+                    searchFolder: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }}+                    runTestsInIsolation: true+                    platform: ${{ matrix.BuildPlatform }}+                    configuration: ${{ matrix.BuildConfiguration }}+                    publishRunAttachments: true+                    collectDumpOn: onAbortOnly+                    vsTestVersion: latest+                  condition: and(succeeded(), not(startsWith(variables.BuildPlatform, 'arm')))++                - task: VSTest@2+                  displayName: Run Universal Unit Tests (UWP)+                  timeoutInMinutes: 5 # Set smaller timeout , due to hangs+                  inputs:+                    testSelector: testAssemblies+                    testAssemblyVer2: |+                      Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.build.appxrecipe+                    searchFolder: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }}+                    runTestsInIsolation: true+                    platform: ${{ matrix.BuildPlatform }}+                    configuration: ${{ matrix.BuildConfiguration }}+                    publishRunAttachments: true+                    codeCoverageEnabled: true+                    collectDumpOn: onAbortOnly+                    vsTestVersion: latest+                  condition: and(succeeded(), not(startsWith(variables.BuildPlatform, 'arm')))++                - task: VSTest@2+                  displayName: Run Universal Unit Tests (NetCore)+                  timeoutInMinutes: 5 # Set smaller timeout , due to hangs+                  inputs:+                    testSelector: testAssemblies+                    testAssemblyVer2: |+                      Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.dll+                    searchFolder: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }}+                    runTestsInIsolation: true+                    platform: ${{ matrix.BuildPlatform }}+                    configuration: ${{ matrix.BuildConfiguration }}+                    publishRunAttachments: true+                    codeCoverageEnabled: true+                    collectDumpOn: onAbortOnly+                    vsTestVersion: latest+                  condition: and(succeeded(), eq(variables.BuildPlatform, 'x64'))++    # This job is the one that accumulates the spread out build tasks into one dependency+    - job: UniversalBuild+      condition: ne( dependencies.Setup.outputs['checkPayload.shouldSkipPRBuild'], 'True' )+      displayName: Universal Build 🏗+      variables:+        - template: ../variables/vs2019.yml+      dependsOn: 

#6623 This cleans up the conditions and the deps on Setup. It is not ideal yet since the nuget package is needed for the CLI test which ideally would be it's own stage.. I'm open to suggestions of groupings for that one.

dannyvv

comment created time in 20 hours

pull request commentmicrosoft/react-native-windows

Use whitespace insensitive compare for identical override detection

<!--[AutoMerge]--> Hello @NickGerleman!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.
NickGerleman

comment created time in 20 hours

Pull request review commentmicrosoft/react-native-windows

Split out Universal build in Build and Test

 steps:         /p:BaseIntDir=$(BaseIntDir)

Let's do in a future PR.

dannyvv

comment created time in 20 hours

Pull request review commentmicrosoft/react-native-windows

Split out Universal build in Build and Test

-parameters:-  - name: buildEnvironment-    type: string-    default : PullRequest-    values: -     - PullRequest -     - Continuous -   -jobs:-  - job: Universal-    variables:-      - template: ../variables/vs2019.yml-    displayName: Universal-    dependsOn:-     - Setup-    condition: ne( dependencies.Setup.outputs['checkPayload.shouldSkipPRBuild'], 'True' )-    strategy:-      matrix: # Why we only build some flavors: https://github.com/microsoft/react-native-windows/issues/4308-        # Start Continuous only-        ${{ if eq(parameters.buildEnvironment, 'Continuous') }}:-          ArmDebug:-            BuildConfiguration: Debug-            BuildPlatform: ARM-        # End Continuous only-        ArmRelease:-          BuildConfiguration: Release-          BuildPlatform: ARM-        # Start Continuous only-        ${{ if eq(parameters.buildEnvironment, 'Continuous') }}:-          Arm64Debug:-            BuildConfiguration: Debug-            BuildPlatform: ARM64-          Arm64Release:-            BuildConfiguration: Release-            BuildPlatform: ARM64-          X64Debug:-            BuildConfiguration: Debug-            BuildPlatform: x64-        # End Continuous only-        X64Release:-          BuildConfiguration: Release-          BuildPlatform: x64-        X86Debug:-          BuildConfiguration: Debug-          BuildPlatform: x86-          LayoutHeaders: true-        # Start Continuous only-        ${{ if eq(parameters.buildEnvironment, 'Continuous') }}:-          X86Release:-            BuildConfiguration: Release-            BuildPlatform: x86-        # End Continuous only-    pool:-      vmImage: $(VmImage)-    timeoutInMinutes: 60-    cancelTimeoutInMinutes: 5+  parameters:+    - name: buildEnvironment+      type: string+      default : PullRequest+      values: +      - PullRequest +      - Continuous +    - name: buildMatrix+      type: object+      default:+        - BuildEnvironment: PullRequest+          Matrix:+            - BuildConfiguration: Release+              BuildPlatform: ARM+            - BuildConfiguration: Release+              BuildPlatform: x64+            - BuildConfiguration: Debug+              BuildPlatform: x86+              LayoutHeaders: true+        - BuildEnvironment: Continuous+          Matrix:+            - BuildConfiguration: Debug+              BuildPlatform: ARM+            - BuildConfiguration: Release+              BuildPlatform: ARM+            - BuildConfiguration: Debug+              BuildPlatform: ARM64+            - BuildConfiguration: Release+              BuildPlatform: ARM64+            - BuildConfiguration: Debug+              BuildPlatform: x64+            - BuildConfiguration: Release+              BuildPlatform: x64+            - BuildConfiguration: Debug+              BuildPlatform: x86+              LayoutHeaders: true+            - BuildConfiguration: Release+              BuildPlatform: x86+      +  jobs:+    - ${{ each config in parameters.buildMatrix }}:+      - ${{ if eq(config.BuildEnvironment, parameters.buildEnvironment) }}:+        - ${{ each matrix in config.Matrix }}:+            - job: UniversalBuild${{ matrix.BuildPlatform }}${{ matrix.BuildConfiguration }}

Thanks for pointing out. I beleive I have addressed most of these in the next update.

dannyvv

comment created time in 20 hours

Pull request review commentmicrosoft/react-native-windows

Use whitespace insensitive compare for identical override detection

 import {normalizePath, unixPath} from './PathUtils'; import FileRepository from './FileRepository'; import isutf8 from 'isutf8'; +export type HashOpts = {+  /**+   * What differences between files should we be insensitive to when generating+   * a hash? Defaults to line-ending insensitivity+   */+  insensitivity?: 'none' | 'line-ending' | 'whitespace';+};++/**+ * Normalize content according to insensitivty rules+ */+function normalizeContent(

I needed to look up the definition of canonical to remember what it meant 😂. I think my own preference would be normalize.

NickGerleman

comment created time in 20 hours

Pull request review commentmicrosoft/react-native-windows

Use whitespace insensitive compare for identical override detection

 import {normalizePath, unixPath} from './PathUtils'; import FileRepository from './FileRepository'; import isutf8 from 'isutf8'; +export type HashOpts = {+  /**+   * What differences between files should we be insensitive to when generating+   * a hash? Defaults to line-ending insensitivity+   */+  insensitivity?: 'none' | 'line-ending' | 'whitespace';+};++/**+ * Normalize content according to insensitivty rules+ */+function normalizeContent(+  content: string | Buffer,+  opts: HashOpts,+): string | Buffer {+  if (+    opts.insensitivity === 'none' ||+    (typeof content !== 'string' && !isutf8(content))+  ) {+    return content;+  }++  switch (opts.insensitivity || 'line-ending') {+    case 'line-ending':+      // Convert to CRLF for legacy hash stability+      return content.toString('utf8').replace(/(?<!\r)\n/g, '\r\n');++    case 'whitespace':

The one case that's kind of interesting is something like {foo} vs { foo } though... To do the right thing we'd probably need a real lexer though...

Normalization does seem safer than ignoring though, and is closer to what we want.

NickGerleman

comment created time in 20 hours

more