Skip to content

Commit

Permalink
#nojira - release luau fixes (#391)
Browse files Browse the repository at this point in the history
* Update version to proper 17.0.1 release

* update all version strings and instructions
  • Loading branch information
RoFlection Bot committed Oct 31, 2023
1 parent 57b89fc commit a390e7d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ A comprehensive, but not exhaustive, translation of upstream ReactJS 17.x into R
## TL;DR

* In a new project, you can consume this library by adding this line to your rotriever.toml
* `React = "github.com/roblox/[email protected]-rc.19"`
* `React = "github.com/roblox/[email protected]"`
* If you have legacy Roact code, use the roact-compat library instead
* `RoactCompat = "github.com/roblox/[email protected]-rc.19"`
* `RoactCompat = "github.com/roblox/[email protected]"`
* Make sure you are using the latest [rotriever](https://github.com/Roblox/rotriever/releases) 0.5 (or later) release
* you can download the release binary, or add it to your `foreman.toml`: ```rotrieve = { source = "roblox/rotriever", version = "=0.5.6" }```
* For unit testing components and trees of components, you'll want to use the [`act()`](https://github.com/threepointone/react-act-examples/blob/master/sync.md) API exported from the react-roblox package.
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ end)
<a href='https://beta.reactjs.org/reference/react/Suspense' target="_blank"><img alt='React' src='../../images/reactjs.svg'/></a> <img alt='Deviation' src='../../images/deviation.svg'/>

!!! warning
**While `React.Suspense` is technically implemented, it should be considered unusable as of version `17.0.1-rc.19`.** This is due to a limitation in Luau around recursive `pcall` depth. Future updates to React will unravel the recursive traversal and enable these features.
**While `React.Suspense` is technically implemented, it should be considered unusable as of version `17.0.1`.** This is due to a limitation in Luau around recursive `pcall` depth. Future updates to React will unravel the recursive traversal and enable these features.
Future version of React eliminate this recursive structure and should enable full use of `Suspense` and error boundaries.

Renders a subtree of children that can yield. If the children suspend while rendering, the `fallback` field provided will be used until the children have resolved their render.
Expand Down
16 changes: 8 additions & 8 deletions docs/migrating-from-1x/upgrading-to-roact-17.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Roact 17 is available as a collection of packages hosted in the https://github.c
2. Add the following to your `rotriever.toml` manifest file:
```toml
[dependencies]
React = "github.com/roblox/[email protected]-rc.19"
ReactRoblox = "github.com/roblox/[email protected]-rc.19"
React = "github.com/roblox/[email protected]"
ReactRoblox = "github.com/roblox/[email protected]"
```
3. Run `rotrieve install` to install all dependencies
4. `React.lua` and `ReactRoblox.lua` will be added to the `Packages` folder generated by rotriever in your project. Make sure this folder is included in your project when testing with `roblox-cli` or Roblox Studio.
Expand All @@ -27,7 +27,7 @@ Make the following changes to your `rotriever.toml` manifest file:
```diff
[dependencies]
- Roact = "github.com/roblox/[email protected]"
+ Roact = { target = "github.com/roblox/roact-alignment", version = "17.0.1-rc.19", package = "RoactCompat" }
+ Roact = { target = "github.com/roblox/roact-alignment", version = "17.0.1", package = "RoactCompat" }
```

This creates a dependency on the `RoactCompat` package, which provides [a compatibility layer](../api-reference/roact-compat.md) for migrating from legacy APIs.
Expand All @@ -39,9 +39,9 @@ Since it's still named `Roact` in the above snippet, it will be aliased to `Roac
However, the `RoactCompat` API only covers enough to provide backwards compatibility. To access new features like hooks or suspense, you will need to add dependencies on `React` and `ReactRoblox` as well:
```toml
[dependencies]
Roact = { target = "github.com/roblox/roact-alignment", version = "17.0.1-rc.19", package = "RoactCompat" }
React = "github.com/roblox/[email protected]-rc.19"
ReactRoblox = "github.com/roblox/[email protected]-rc.19"
Roact = { target = "github.com/roblox/roact-alignment", version = "17.0.1", package = "RoactCompat" }
React = "github.com/roblox/[email protected]"
ReactRoblox = "github.com/roblox/[email protected]"
```

The `RoactCompat` package **can be safely mixed and matched** with the new `React` and `ReactRoblox` packages; it's nothing more than a thin wrapper around them that aligns with the legacy Roact API and semantics.
Expand All @@ -64,7 +64,7 @@ You might encounter this if you have existing dependencies on any of the followi
To resolve this, you can patch over any dependencies on legacy Roact and align them with your newly-added version. Add this additional section to your `rotriever.toml` manifest file:
```toml
[config.patch."github.com/roblox/roact"]
Roact = { target = "github.com/roblox/roact-alignment", version = "17.0.1-rc.19", package = "RoactCompat" }
Roact = { target = "github.com/roblox/roact-alignment", version = "17.0.1", package = "RoactCompat" }
```

To learn more about patching dependencies, check out [the Rotriever documentation](https://roblox.github.io/rotriever/guide/specifying-dependencies/#patching-dependencies).
Expand All @@ -82,7 +82,7 @@ One reasonable way to accomplish this is to depend on _both_ projects, but to co
Roact = "github.com/roblox/[email protected]"

[dev_dependencies]
RoactCompat = "github.com/roblox/[email protected]-rc.19"
RoactCompat = "github.com/roblox/[email protected]"
```

This declares a dependency on legacy Roact as well as a [dev dependency](https://roblox.github.io/rotriever/guide/specifying-dependencies/#development-dependencies) on Roact 17.
Expand Down
2 changes: 1 addition & 1 deletion rotriever.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
version = "17.0.1-rc.19"
version = "17.0.1"
members = ["modules/*"]
authors = [
"Paul Doyle <[email protected]>",
Expand Down
10 changes: 5 additions & 5 deletions standalone/rotriever.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "Roact17"
version = "17.0.1-rc.19"
version = "17.0.1"
content_root = "src"

[dependencies]
RoactCompat = "github.com/roblox/[email protected]-rc.19"
React = "github.com/roblox/[email protected]-rc.19"
ReactRoblox = "github.com/roblox/[email protected]-rc.19"
ReactIs = "github.com/roblox/[email protected]-rc.19"
RoactCompat = "github.com/roblox/[email protected]"
React = "github.com/roblox/[email protected]"
ReactRoblox = "github.com/roblox/[email protected]"
ReactIs = "github.com/roblox/[email protected]"

0 comments on commit a390e7d

Please sign in to comment.