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

Need to store downloaded package information #3

Open
ericoporto opened this issue Jan 26, 2020 · 0 comments
Open

Need to store downloaded package information #3

ericoporto opened this issue Jan 26, 2020 · 0 comments

Comments

@ericoporto
Copy link
Owner

ericoporto commented Jan 26, 2020

The way we are going to do is provide a folder inside the scripts node where we are going to insert the downloaded packages.

Packages obtained through AgsGet will get an AG_ appended at start of them to avoid name conflicts.

When we get a package, we need to write down the order they will be inserted and the version we have get in a package-lock.json file written at the project root.

{
order : ["timer","arrowselect"],
packages : {
  timer: "0.7.0",
  arrowselect: "0.5.0"
  }
}

For now the version information is useless, since the index only contains latest version, but this may be useful in a future interaction. The order though, is useful, it works like this: when I get a package, I need to insert it in the list, that package may have a dependency, if it does, we need to check if the dependency is already in the order entry, if not, we insert it there, in any case, we place the package we are getting, after.

The order is used to clear and rewrite the order of the scripts in the AgsGet Script folder node.

We are not storing AgsGet information in Game.agf since a game project may be loaded on a PC without AgsGet installed and it needs to be alright.

Overall, AgsGet is stateless, except by which packages it has and has not already inserted. Imagine we get two packages that have the same package as dependency, the dependency has to remain unique, and has to be inserted before both. But we are not getting both packages at the same time.


Theoretically we have nodes in Game.agf in a folder called agsget on top of everything in the script node of the project explorer, I am storing information duplicate outside because operating the Game.agf file is something I want to avoid as much as I can, and I don't want to lock the possibilities in only script modules, remember, in the future one could have a package for a GUI and script package could depend on it!

Also, one day we want to provide specific versions of things, and only script modules support version and not everyone sets their values correctly.

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

No branches or pull requests

1 participant