oribuild-darwin-amd64
Advanced tools
Comparing version 0.0.0-pre-alpha.10-8fe417b to 0.0.0-pre-alpha.10-909dafe
{ | ||
"name": "oribuild-darwin-amd64", | ||
"license": "MIT", | ||
"version": "0.0.0-pre-alpha.10-8fe417b", | ||
"version": "0.0.0-pre-alpha.10-909dafe", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "url": "https://github.com/microsoft/ori" |
151
README.md
@@ -6,3 +6,4 @@ # ori | ||
## Configuration & Usage | ||
``` | ||
```` | ||
ori -h | ||
@@ -23,11 +24,17 @@ | ||
-logLevel string | ||
log level (error|warning|info|debug) | ||
log level (error|warning|info|verbose|debug) | ||
-logTs | ||
log typescript output to stdio | ||
-noTui | ||
Disable the tui and print everything to stdio | ||
-nosplit | ||
Disable codesplitting. Allows for bundling without esm. (default true) | ||
Disable codesplitting. Allows for bundling without esm. | ||
-port int | ||
Port to run the http server on (default 3000) | ||
-snoop | ||
log every import as it happens. To help debug why a given module is imported. | ||
log imports to a snoop.json file, which can be analyzed to determine why a module is included in a build. | ||
-sourcemap string | ||
Generate sourcemaps (one of 'none', 'inline', 'external', 'linked', 'inline-and-external') (default "none") | ||
-strategy string | ||
Build Strategy (default "vendor") | ||
-trace string | ||
@@ -41,3 +48,4 @@ Generate an event trace at the given path | ||
Print the version and exit | ||
``` | ||
-write | ||
Write to disk``` | ||
@@ -51,3 +59,3 @@ ### ori.json fields | ||
// Where to find resource.json files | ||
// | ||
// | ||
// TODO: document resource.json files | ||
@@ -58,3 +66,3 @@ // | ||
// Where to find source files to watch | ||
// | ||
// | ||
// Should be deprecated by #4 | ||
@@ -78,3 +86,3 @@ "watchSourceRoots": ["packages", "shared"], | ||
// Entrypoints to workers | ||
// | ||
// | ||
// Workers are built separately, see WorkerLoader for details | ||
@@ -103,42 +111,67 @@ // | ||
} | ||
``` | ||
```` | ||
## Build Strategies | ||
Rather than alwasy running a single esbuild build, it is sometimes more performant | ||
or practical to run multiple separate builds. The different ways of coordinating and | ||
connecting these separate builds are called "build strategies". | ||
### Strategy `single` | ||
This build strategy will run everything as a single giant esbuild run. This is the simplest | ||
and least error-prone approach, but will also tend to be the least performant | ||
### Strategy `vendor` | ||
This build strategy scans your repository for information about external dependencies on startup, | ||
and uses that information to build all of your external dependenices as a separate build. | ||
This tends to speed up interactive iterative builds, because it cuts out the dependencies from | ||
the code being rebuilt. However, if new imports are requested from the import set, the whole | ||
vendor build will have to re-run. Depending on the size of your main build, & your dependencies, | ||
rebuilding both may be slower than rebuilding both with `single`. | ||
## Working on `ori` | ||
### Getting Dependencies | ||
- install go 1.18 https://go.dev/doc/install | ||
- If on windows, install mingw-gcc. | ||
This is to support building libsass on windows https://github.com/wellington/go-libsass/issues/37 | ||
There are two ways to do this right now: | ||
1. **Via Chocolatey**: | ||
- Install [Chocolatey](https://chocolatey.org/) | ||
- Install mingw from chocolatey `choco install mingw`. At time of writing this installs `mingw 11.2.0.07112021` | ||
2. **Manually**: do this only if you encounter issues with the version distributed by `chocolatey`: | ||
- Get a build from https://www.mingw-w64.org/downloads/#mingw-builds (the sourceforge link) | ||
- If the live installer fails, you can download the prebuilt binaries directly and add those to your path | ||
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/ | ||
- Prebuilt binaries require 7zip to extract https://www.7-zip.org/ | ||
- I installed x86_64-posix-seh | ||
- Add the path of mingw-gcc's bin to your path (in my case /c/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin) | ||
- _(Optional, but recommended)_ Install the `go` vscode plugin, and click "Install All" when it prompts you to install missing golang components (godef, gopkgs, gopls) | ||
- install go 1.18 https://go.dev/doc/install | ||
- If on windows, install mingw-gcc. | ||
This is to support building libsass on windows https://github.com/wellington/go-libsass/issues/37 | ||
There are two ways to do this right now: | ||
1. **Via Chocolatey**: | ||
- Install [Chocolatey](https://chocolatey.org/) | ||
- Install mingw from chocolatey `choco install mingw`. At time of writing this installs `mingw 11.2.0.07112021` | ||
2. **Manually**: do this only if you encounter issues with the version distributed by `chocolatey`: | ||
- Get a build from https://www.mingw-w64.org/downloads/#mingw-builds (the sourceforge link) | ||
- If the live installer fails, you can download the prebuilt binaries directly and add those to your path | ||
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/ | ||
- Prebuilt binaries require 7zip to extract https://www.7-zip.org/ | ||
- I installed x86_64-posix-seh | ||
- Add the path of mingw-gcc's bin to your path (in my case /c/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin) | ||
- _(Optional, but recommended)_ Install the `go` vscode plugin, and click "Install All" when it prompts you to install missing golang components (godef, gopkgs, gopls) | ||
### Running ori from this repo | ||
1. Set up a ori.json and patches directory in your target project. | ||
See above for the ori.json fields | ||
See above for the ori.json fields | ||
> TODO: document the patches directory | ||
> TODO: document the patches directory | ||
> TODO: make a an example of an oribuild project + config (#10) | ||
> TODO: make a an example of an oribuild project + config (#10) | ||
2. Building and Running | ||
```sh | ||
cd oribuild | ||
go run . -c ../path/to/ori.json` | ||
``` | ||
```sh | ||
cd oribuild | ||
go run . -c ../path/to/ori.json` | ||
``` | ||
The first time you run this, go will fetch and build all the dependencies in oribuild/go.mod | ||
The first time you run this, go will fetch and build all the dependencies in oribuild/go.mod | ||
@@ -149,22 +182,23 @@ ### Catches | ||
- in client-web: `yarn gulp gqlgen:generate` needs to be run manually after any graphql change. | ||
- node_modules are not monitored and assumed to be always stable. If you edit node_modules, you | ||
will need to save another file to refresh. | ||
Once separate builds are implemented (#8), you will have to restart the whole build agent, | ||
unless you specifically omit that node_module from the build cache | ||
- ori exits with error `0xc0000139` on windows | ||
- in client-web: `yarn gulp gqlgen:generate` needs to be run manually after any graphql change. | ||
- node_modules are not monitored and assumed to be always stable. If you edit node_modules, you | ||
will need to save another file to refresh. | ||
Once separate builds are implemented (#8), you will have to restart the whole build agent, | ||
unless you specifically omit that node_module from the build cache | ||
- ori exits with error `0xc0000139` on windows | ||
```sh | ||
$ go run . -h | ||
exit status 0xc0000139 | ||
``` | ||
```sh | ||
$ go run . -h | ||
exit status 0xc0000139 | ||
``` | ||
This translates to STATUS_ENTRYPOINT_NOT_FOUND | ||
https://pkg.go.dev/golang.org/x/sys/windows | ||
This translates to STATUS_ENTRYPOINT_NOT_FOUND | ||
https://pkg.go.dev/golang.org/x/sys/windows | ||
This might mean you have the wrong mingw install version and windows can't | ||
find the entrypoint symbols for the libsass binary at runtime? not 100% sure | ||
but changing the mingw version to the one specified above fixes the issue. | ||
This might mean you have the wrong mingw install version and windows can't | ||
find the entrypoint symbols for the libsass binary at runtime? not 100% sure | ||
but changing the mingw version to the one specified above fixes the issue. | ||
### Useful Snippets | ||
```sh | ||
@@ -208,16 +242,16 @@ # with mingw on your path | ||
- Why not use the esbuild node API? | ||
In short, we tried it and it was slow. Initial build times were several minutes, compared to the 40-odd seconds we see with the go api because of all the time plugins spent waiting to run on the node main thread. | ||
In short, we tried it and it was slow. Initial build times were several minutes, compared to the 40-odd seconds we see with the go api because of all the time plugins spent waiting to run on the node main thread. | ||
- Can I customize `ori` for my monorepo? | ||
For now, `ori` will remain extremly opinionared on what the monorepo shape must look like. As much as possible, we want to prefer convention over configuration. | ||
For now, `ori` will remain extremly opinionared on what the monorepo shape must look like. As much as possible, we want to prefer convention over configuration. | ||
In the same vein, rather than implementing plugins or encouraging people to fork and make their own custom builds of `ori`, new functionality will be added to the same `ori` binaries as needed. | ||
In the same vein, rather than implementing plugins or encouraging people to fork and make their own custom builds of `ori`, new functionality will be added to the same `ori` binaries as needed. | ||
- Why is it called `ori`? | ||
`ori` was started by the Outlook Web team, and is short for `OWA Rapid Innerloop`. | ||
`ori` was started by the Outlook Web team, and is short for `OWA Rapid Innerloop`. | ||
It can also be easily typed on a single row of a QWERTY keyboard without using your fifth fingers, which I value because I have ulnar neuropathy. | ||
It can also be easily typed on a single row of a QWERTY keyboard without using your fifth fingers, which I value because I have ulnar neuropathy. | ||
@@ -228,3 +262,3 @@ > TODO: Populate this section as people ask more questions | ||
This project welcomes contributions and suggestions. Most contributions require you to agree to a | ||
This project welcomes contributions and suggestions. Most contributions require you to agree to a | ||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us | ||
@@ -243,7 +277,6 @@ the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. | ||
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft | ||
trademarks or logos is subject to and must follow | ||
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft | ||
trademarks or logos is subject to and must follow | ||
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). | ||
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. | ||
Any use of third-party trademarks or logos are subject to those third-party's policies. | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21763647
272