You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "keon94 (via GitHub)" <gi...@apache.org> on 2023/05/15 17:47:24 UTC
[GitHub] [incubator-devlake] keon94 opened a new issue, #5195: [Refactor][Framework] Refactor Scope and Transformations to not rely on Reflections
keon94 opened a new issue, #5195:
URL: https://github.com/apache/incubator-devlake/issues/5195
## What and why to refactor
scope_helper and transformation_rules_helper rely heavily on reflections to retrieve/set fields. This is not an optimal solution: it's slow, obfuscates the code and makes it hard to maintain: for example, a developer can't look at a Scope model and know what fields are required and if they need to be named a certain way.
## Describe the solution you'd like
How to refactor?
Require Scope and TransformationRules to implement interfaces with the required Getters and Setters method to bypass the need for reflections. This will touch every Go plugin, so expect a large number of file changes. Alternatively, to mimimize the boilerplate, consider doing what we did with Python. Define a base ScopeModel and TransformationModel struct and embed them in the models. Define a single Getter interface that retrieves this struct by pointer. Have all models implement this interface.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] github-actions[bot] commented on issue #5195: [Refactor][Framework] Refactor Scope and Transformations to not rely on Reflections
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5195:
URL: https://github.com/apache/incubator-devlake/issues/5195#issuecomment-1592154082
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] github-actions[bot] commented on issue #5195: [Refactor][Framework] Refactor Scope and Transformations to not rely on Reflections
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5195:
URL: https://github.com/apache/incubator-devlake/issues/5195#issuecomment-1601848672
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] github-actions[bot] closed issue #5195: [Refactor][Framework] Refactor Scope and Transformations to not rely on Reflections
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #5195: [Refactor][Framework] Refactor Scope and Transformations to not rely on Reflections
URL: https://github.com/apache/incubator-devlake/issues/5195
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org