Skip to content
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

Generate server->shared cross realm links #38

Merged
merged 3 commits into from
Nov 10, 2021

Conversation

magnalite
Copy link
Member

@magnalite magnalite commented Oct 14, 2021

We want to reduce the number of packages we have in the datamodel, primarily this means keeping only one copy of each package. Some packages in the server realm will depend on shared packages, however due to this optimisation they will be held in separate locations in the datamodel.

To allow server packages to require shared packages we can generate links which reference across realms. This is notable because we cannot generate these links as relative paths. We also don't know the absolute location of where shared packages are as Rojo manages their location.

In order to know where the shared packages are to generate these cross realm links an additional field has been added to the wally.toml. As an example the wally.toml may look like this.

[package]
name = "magnalite/my-package"
version = "1.4.2"
license = "Apache-2.0"
registry = "https://github.com/UpliftGames/wally-index"
realm = "server"

[place]
shared-packages = "game.ReplicatedStorage.Packages"

[dependencies]
Promise = "evaera/promise@3.1.0"

I see it fit to put this in the "place" table to emphasise this is metadata describing the place it will be sync'd into and not information related to the package itself. This can also be where we add any further metadata about where the package will be sync'd we may require.

Base automatically changed from support-registry-fallbacks to main November 10, 2021 17:06
@magnalite magnalite merged commit 57262fb into main Nov 10, 2021
@magnalite magnalite deleted the cross-realm-link-generation branch November 10, 2021 17:33
@magnalite magnalite added this to the Essential feature complete milestone Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant