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

Require one module from another locally is broken #186

Closed
gfwilliams opened this Issue Feb 26, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@gfwilliams
Member

gfwilliams commented Feb 26, 2018

It seems like there's something weird going on with project.js's handling of modules: http://forum.espruino.com/conversations/279130/#comment14110348

@nhamer

This comment has been minimized.

Show comment
Hide comment
@nhamer

nhamer Mar 5, 2018

nhamer commented Mar 5, 2018

@nhamer

This comment has been minimized.

Show comment
Hide comment
@nhamer

nhamer Mar 5, 2018

Not a 100% repro - I was playing around with project directories, and it succeeded until exiting and restarting the IDE (Win10, native).

"search took too long" - project.js has a 50ms timeout on module load - may be as simple as bumping it.

nhamer commented Mar 5, 2018

Not a 100% repro - I was playing around with project directories, and it succeeded until exiting and restarting the IDE (Win10, native).

"search took too long" - project.js has a 50ms timeout on module load - may be as simple as bumping it.

@gfwilliams gfwilliams closed this in 9af9e61 Mar 5, 2018

@gfwilliams

This comment has been minimized.

Show comment
Hide comment
@gfwilliams

gfwilliams Mar 5, 2018

Member

Thanks - just bumped it to 250ms and it works for me - although I disabled it if projects isn't enabled so it doesn't cause an extra delay for everyone.

That project code is pretty iffy - it seems to potentially call the callback function more than once or not at all, hence the timeout. I had a quick go at fixing it just now, but it ended up being too much of a nightmare - I think realistically it needs a bit of a rewrite.

Member

gfwilliams commented Mar 5, 2018

Thanks - just bumped it to 250ms and it works for me - although I disabled it if projects isn't enabled so it doesn't cause an extra delay for everyone.

That project code is pretty iffy - it seems to potentially call the callback function more than once or not at all, hence the timeout. I had a quick go at fixing it just now, but it ended up being too much of a nightmare - I think realistically it needs a bit of a rewrite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment