-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
file patcher for code weaving (eg module timer, template preprocessing, code generation) #2
Comments
aleksanderwlodarczyk/file-patcher@fe4e86f Should it be only for file processing or for loading too? f.e we have theme loader in lighttouch-base that patches the themes and load them. This tool should be universal way of file patching, right? |
Yes |
Should work for each case |
What you're doing doesn't look right. It should only have the mechanisms. It shouldn't know about "rules" and "themes" etc. Lighttouch should use that. Other things should use it too for its common mechanisms |
Okay, but if I started this way I decided to finish theme patching and then refactor it to be mechanism only. But how do you want the patcher to recognize which mechanism should it use? So far the first 'milestone' is working outsourced mechanisms for rules, actions and themes |
I was trying to update it today but I can't understand how should we have multiple mechanisms and do not switching it with "rules", "actions"? Do you want it to be just preprocessors table and add such a preprocessors in each app? |
sounds good |
Okay, I think I almost got what you want. Here at aleksanderwlodarczyk/file-patcher@4cc39ec I got preety clean solution but Lua seems to has problems with 'unpack' which I am using first time (https://www.lua.org/pil/5.2.html) I will try to fix this problem because 'unpack' seems to be ideal to use it here where we need functions with various parameters number |
Lighttouch should also have a dependent patch to use the file patcher |
Okay, so current version is working for any number of parameters In our version of Lua we should use (...) instead of unpack(args) (https://stackoverflow.com/questions/38749099/lua-variable-length-function-arguments-are-nil/38749326) Should I start refactoring lighttouch to use this patcher? |
it looks pretty worthless, tbh I really don't know what if anything you've accomplished. mind filling me? |
Worthless? I asked you if you want patching modes - you said you want, I did the modes, you said it should be more universal, I asked should it be only table for preprocessors and each app should add their own - you said it sounds good and now you are saying it is worthless? Funny.... Really funny |
If you're gonna go off doing your own thing, idk how to help other than to wait and see what you come up with. I'm trying to reach you on discord so we can dialogue. |
I went back and looked again for what I had a hunch I must have been missing.. In fact the code you made was there, but somewhere different than where you linked, 2ac7a01#diff-a71c5bb21ea277cd777a78278660cd85 So, it seems like you were on the right track.. Yes I do want you to refactor lighttouch. (Sorry for jumping to the belief that you had failed; I should have dug deeper.) Do you still want to carry this though? |
No description provided.
The text was updated successfully, but these errors were encountered: