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

WIP: add optional argument to specify which modules to patch #65

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

ida613
Copy link

@ida613 ida613 commented Mar 25, 2024

Add the option to specify a list of modules to patch through env var MODULES_TO_PATCH. This allows IITM to ignore some files, potentially resulting in a performance gain. This also might help eliminating IITM errors since less files are being patched.
If MODULES_TO_PATCH is not specified, everything behaves as usual.

@ida613 ida613 changed the title added optional argument to specify modules to patch added optional argument to specify which modules to patch Mar 26, 2024
@ida613 ida613 changed the title added optional argument to specify which modules to patch add optional argument to specify which modules to patch Mar 26, 2024
@ida613 ida613 changed the title add optional argument to specify which modules to patch WIP: add optional argument to specify which modules to patch Mar 26, 2024
khanayan123
khanayan123 previously approved these changes Mar 28, 2024
@khanayan123
Copy link
Contributor

could we add some unit tests to verify the functionality?

Copy link
Member

@Qard Qard left a comment

Choose a reason for hiding this comment

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

Why an env var vs passing the config in as a parameter to createHook? An env var seems a bit clumsy. 🤔

@ida613
Copy link
Author

ida613 commented Apr 12, 2024

Why an env var vs passing the config in as a parameter to createHook? An env var seems a bit clumsy. 🤔

If we pass in module list as a parameter to createHook, the user would have to customize the hook by copying the content of hook.mjs to their own project. Putting the hook in a different directory would mess up isIitm and iitmURL

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

Successfully merging this pull request may close these issues.

3 participants