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

Talents are weak references for their decorated objects. #1

Open
marcoonroad opened this issue Aug 18, 2017 · 1 comment
Open

Talents are weak references for their decorated objects. #1

marcoonroad opened this issue Aug 18, 2017 · 1 comment

Comments

@marcoonroad
Copy link
Owner

I must either document that feature or remove it entirely (if I'm considering it a bug). It's a serious implication on the whole system, 'cause talents are created dynamically, thus they will be destroyed dinamically as well. On the other side, it's quite unsound to remove behavior from the decorated objects, despite the dynamic feel of talent acquisition/learning and releasing. The interface is affected and clients relying on that won't expect undefined behavior. Some careful design choice is needed here, it won't be possible to go back and break the API. Hence, it demands some time, review, tradeoffs and proper attention.

@marcoonroad marcoonroad self-assigned this Aug 18, 2017
@marcoonroad marcoonroad added this to the Release of version 0.1-2. milestone Aug 20, 2017
@marcoonroad
Copy link
Owner Author

After thinking a lot, it's better to:

  • State explicitly where (i.e, on decorated objects) and which talents are removed/released. The removal/releasing will affect only the said decorated object, so things here are also fine-grained.
  • Cover on test suite that bug.

There's some major problem regarding the Lua version 5.1. Such version (either official or LuaJIT) doesn't collect/release unreachable talent references. See the following Travis-CI build https://travis-ci.org/marcoonroad/talents/builds/270607083 🔗 .

Therefore, the explicit talent releasing won't break the API on old Lua versions.

@marcoonroad marcoonroad mentioned this issue Dec 8, 2018
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant