-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Auto-linking for native modules (source-based) #5044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
874bb71
Auto-linking for native modules (source-based)
jonthysell 0efda8d
Change files
jonthysell e3ddf46
Addressing feedback: fix check description
jonthysell 4b24f68
Addressing feedback: remove ConsoleToMsBuild
jonthysell d4602d0
Addressing feedback: fix changelog entry
jonthysell 9209a73
Addressing feedback: autolink nit
jonthysell bc5df11
Addressing feedback: project type guids const
jonthysell c5c2d57
Addressing feedback: name args when runWindows calls autolinkWindows
jonthysell 62cfeaa
Addressing feedback: simplified config schema
jonthysell c0d6856
Merge branch 'master' into autolink
jonthysell 14c9f12
Merge branch 'master' into autolink
jonthysell 72a046e
Addressing feedback: fixing RegisterAutolinkedNativeModulePackages
jonthysell a56d757
Merge branch 'master' into autolink
jonthysell 2577747
Addressing feedback: vstools function names and comments
jonthysell 606ae09
Addressing feedback: switching to template files
jonthysell 95aad10
Addressing feedback: fix cpp/cs namespace normalization
jonthysell 264c487
Addressing feedback: add timer to measure autolink performance
jonthysell e730769
Addressing feedback: update config heurestics
jonthysell d86c73c
Merge branch 'master' into autolink
jonthysell d8b9cde
Fixing propagation of run-windows --no-autolink to skip check during …
jonthysell 1ee351b
Merge branch 'master' into autolink
jonthysell 0efe81c
Addressing feedback: JSDoc comments
jonthysell da80e91
Fixing config schema for direct dependencies, adding examples of over…
jonthysell a4f4ee3
Fixed bug: a null userConfig should prevent auto-linking
jonthysell 81390ec
Addressing feedback: validate output from react-native config
jonthysell cedfce5
Addressing feedback: consolidating solution searching
jonthysell f3cb305
Merge branch 'master' into autolink
jonthysell 9a631e9
Fixed build error in run-windows
jonthysell f018c0a
Fixed run-windows getting project root
jonthysell df666e2
Pass through sln and proj flags to autolinking, process errors
jonthysell 46b5c33
Addressing feedback: proper xml parsing
jonthysell 919cbdb
Update sln/proj args to better explain their behavior
jonthysell 1fe5ec9
Fix to make sure autolink check always runs on the correct sln/proj
jonthysell 8a99753
Merge branch 'master' into autolink
jonthysell e30305f
yarn lock fix
jonthysell 8b116fb
Merge branch 'master' into autolink
jonthysell cdfe4c9
Merge branch 'master' into autolink
jonthysell d2d8431
Merge branch 'master' into autolink
jonthysell 1eb05a7
Merge branch 'master' into autolink
jonthysell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
change/react-native-windows-2020-05-28-13-42-40-autolink.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "comment": "Auto-linking for native modules (source-based)", | ||
| "packageName": "react-native-windows", | ||
| "email": "jthysell@microsoft.com", | ||
| "dependentChangeType": "patch", | ||
| "date": "2020-05-28T20:42:40.417Z" | ||
| } |
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
13 changes: 13 additions & 0 deletions
13
packages/E2ETest/windows/ReactUWPTestApp/AutolinkedNativeModules.g.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // AutolinkedNativeModules.g.cs contents generated by "react-native autolink-windows" | ||
|
|
||
| using System.Collections.Generic; | ||
|
|
||
| namespace Microsoft.ReactNative.Managed | ||
| { | ||
| internal static class AutolinkedNativeModules | ||
| { | ||
| internal static void RegisterAutolinkedNativeModulePackages(IList<IReactPackageProvider> packageProviders) | ||
| { | ||
| } | ||
| } | ||
| } |
6 changes: 6 additions & 0 deletions
6
packages/E2ETest/windows/ReactUWPTestApp/AutolinkedNativeModules.g.targets
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <!-- AutolinkedNativeModules.g.targets contents generated by "react-native autolink-windows" --> | ||
| <ItemGroup> | ||
| </ItemGroup> | ||
| </Project> |
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
13 changes: 13 additions & 0 deletions
13
packages/microsoft-reactnative-sampleapps/react-native.config.js
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,16 @@ | ||
| // Change the below to true for autolink to target SampleAppCS instead of SampleAppCPP. | ||
| // Then run `npx react-native autolink-windows` to actually run the autolink. | ||
| const targetCS = false; | ||
|
|
||
| module.exports = { | ||
| reactNativePath: '../../vnext', | ||
| project: { | ||
| windows: { | ||
| sourceDir: 'windows', | ||
| solutionFile: 'SampleApps.sln', | ||
| project: { | ||
| projectFile: targetCS ? 'SampleAppCS\\SampleAppCS.csproj' : 'SampleAppCPP\\SampleAppCPP.vcxproj', | ||
| }, | ||
| }, | ||
| }, | ||
| }; |
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
13 changes: 13 additions & 0 deletions
13
packages/microsoft-reactnative-sampleapps/windows/SampleAppCPP/AutolinkedNativeModules.g.cpp
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // AutolinkedNativeModules.g.cpp contents generated by "react-native autolink-windows" | ||
| // clang-format off | ||
| #include "pch.h" | ||
| #include "AutolinkedNativeModules.g.h" | ||
|
|
||
| namespace winrt::Microsoft::ReactNative | ||
| { | ||
|
|
||
| void RegisterAutolinkedNativeModulePackages(winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::ReactNative::IReactPackageProvider> const& packageProviders) | ||
| { | ||
| } | ||
|
|
||
| } |
10 changes: 10 additions & 0 deletions
10
packages/microsoft-reactnative-sampleapps/windows/SampleAppCPP/AutolinkedNativeModules.g.h
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // AutolinkedNativeModules.g.h contents generated by "react-native autolink-windows" | ||
| #pragma once | ||
|
|
||
| // clang-format off | ||
| namespace winrt::Microsoft::ReactNative | ||
| { | ||
|
|
||
| void RegisterAutolinkedNativeModulePackages(winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::ReactNative::IReactPackageProvider> const& packageProviders); | ||
|
|
||
| } |
6 changes: 6 additions & 0 deletions
6
...s/microsoft-reactnative-sampleapps/windows/SampleAppCPP/AutolinkedNativeModules.g.targets
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <!-- AutolinkedNativeModules.g.targets contents generated by "react-native autolink-windows" --> | ||
| <ItemGroup> | ||
| </ItemGroup> | ||
| </Project> |
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
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
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
13 changes: 13 additions & 0 deletions
13
packages/microsoft-reactnative-sampleapps/windows/SampleAppCS/AutolinkedNativeModules.g.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // AutolinkedNativeModules.g.cs contents generated by "react-native autolink-windows" | ||
|
|
||
| using System.Collections.Generic; | ||
|
|
||
| namespace Microsoft.ReactNative.Managed | ||
| { | ||
| internal static class AutolinkedNativeModules | ||
jonthysell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| internal static void RegisterAutolinkedNativeModulePackages(IList<IReactPackageProvider> packageProviders) | ||
| { | ||
| } | ||
| } | ||
| } | ||
6 changes: 6 additions & 0 deletions
6
...es/microsoft-reactnative-sampleapps/windows/SampleAppCS/AutolinkedNativeModules.g.targets
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <!-- AutolinkedNativeModules.g.targets contents generated by "react-native autolink-windows" --> | ||
| <ItemGroup> | ||
| </ItemGroup> | ||
| </Project> |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.