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

Add hot-reload #12

Open
ZeroEkkusu opened this issue Dec 14, 2023 · 7 comments
Open

Add hot-reload #12

ZeroEkkusu opened this issue Dec 14, 2023 · 7 comments
Assignees

Comments

@ZeroEkkusu
Copy link
Member

As demoed in the readme.

@kamuik16
Copy link
Contributor

kamuik16 commented Jan 20, 2024

As demoed in the readme.

Hey @ZeroEkkusu! I tried to implement this!

So, the main tweak I made was adding this inotifywait loop to the shell script. This bit keeps an eye on all .sol files in the src folder and its subfolders. Whenever you make a change to any of these files, the script kicks into action and automatically updates the report, using the same commit reference you initially gave it.

Is this something you had in mind? If you'd like to see the changes see here.

@ZeroEkkusu
Copy link
Member Author

ZeroEkkusu commented Jan 22, 2024

This looks like hot-reload 🔥

I haven't had a chance to dive into the code, but can give some feedback based on what I've noticed:

  1. I see the subdirectory mentioned - does it mean it doesn't detect deeper than that?
  2. If possible, we should get the name of the file that has been created/modified/deleted and re-run the tool only for that file. The reason for this is that if the codebase is large, hot-reload will be slow if we have to re-analyze all files. May be easier to create a mini function that mimics run.sh to use for that?

@kamuik16
Copy link
Contributor

This looks like hot-reload 🔥

I haven't had a chance to dive into the code, but can give some feedback based on what I've noticed:

  1. I see the subdirectory mentioned - does it mean it doesn't detect deeper than that?
  2. If possible, we should get the name of the file that has been created/modified/deleted and re-run the tool only for that file. The reason for this is that if the codebase is large, hot-reload will be slow if we have to re-analyze all files. May be easier to create a mini function that mimics run.sh to use for that?

I have tried to implement the above suggesstions here. Let me know what you think about this.

@ZeroEkkusu
Copy link
Member Author

ZeroEkkusu commented Jan 30, 2024

Hey, @kamuik16,

I was away, so I didn't get a chance to respond - sorry about that.

Thank you, I'll ping you after I take a look!

@kamuik16
Copy link
Contributor

Hey, @kamuik16,

I was away, so I didn't get a chance to respond - sorry about that.

Thank you, I'll ping you after I take a look!

Hey @ZeroEkkusu! Good to see you back! I have just pushed the recent changes and can open a draft PR regarding this so you can also suggest/make changes. I also opened #19 PR suggesting a new feature if this is something you'd like to see.

@ZeroEkkusu
Copy link
Member Author

ZeroEkkusu commented Feb 1, 2024

Looking good so far - let's create a PR to do a proper review!

@kamuik16 kamuik16 mentioned this issue Feb 1, 2024
3 tasks
@kamuik16
Copy link
Contributor

kamuik16 commented Feb 1, 2024

Looking good so far - let's create a PR to do a proper review!

Opened a Draft PR #20.

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

No branches or pull requests

2 participants