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

[Lua][Improvement] Consider processing all init.lua before other scripts #995

Open
deflinhec opened this issue Mar 15, 2023 · 2 comments
Open

Comments

@deflinhec
Copy link
Contributor

Shouldn't init.lua been processed before all other scripts?

Asscending depth order of folder structure and priority to init.lua before other script.

@deflinhec
Copy link
Contributor Author

I'm running a project which contain an api folder, all dependecy have been handled and server starts without complains. After I deleted the api folder, some of the global variable and global functions are now missing, which affect to other modules.

Current the compling order will look like this.

  1. class.agent
  2. class.init
  3. class.table
  4. game.agent
  5. game.init
  6. game.table
  7. init

It should be like this, in case of breaking the dependency between.

  1. init
  2. class.init
  3. game.init
  4. class.agent
  5. class.table
  6. game.agent
  7. game.table

@deflinhec
Copy link
Contributor Author

I could provide a PR if needed.

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