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

fix: Better handling of ComponentSystem loading with optional dependencies #4841

Merged
merged 3 commits into from
Aug 13, 2021

Conversation

DarkWeird
Copy link
Contributor

Contains

  • Fixes hard crash when System using optional dependency's class in method signature
  • Better handling error when system crashes at registering
  • ahead detection for using optional dependency at system

How to test

Start JS with optional dependencies:

  1. without
  2. with Genome
  3. with BasicCrafting

@github-actions github-actions bot added Category: Build/CI Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc. Type: Bug Issues reporting and PRs fixing problems labels Aug 13, 2021
Copy link
Member

@skaldarnar skaldarnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see - if we cannot meet all requirements a system has we skip it - so if we have one big system depending on 5 optional modules it won't load if any of those is missing.

To improve the situation, we split systems such that they have high cohesion w.r.t. to the modules they (optionally) depend on.

Will test later today, but the changes look reasonable to me and I think make it better understandable, even if not a perfect solution for the underlying problem...

Copy link
Member

@skaldarnar skaldarnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work nicely, tested with Simple Farming in Metal Renegades.

@skaldarnar skaldarnar changed the title bugfix: Better handling ComponentSystem loading with optional dependencies fix: Better handling of ComponentSystem loading with optional dependencies Aug 13, 2021
@skaldarnar skaldarnar merged commit 52713cf into develop Aug 13, 2021
@skaldarnar skaldarnar deleted the fix/optional-deps-systems-loading branch August 13, 2021 21:48
@keturn keturn added this to the v5.2.0 milestone Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Build/CI Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc. Type: Bug Issues reporting and PRs fixing problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants