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

Infinite loop in 4.0.3 #194

Closed
trieloff opened this issue Jan 9, 2020 · 6 comments · Fixed by #195
Closed

Infinite loop in 4.0.3 #194

trieloff opened this issue Jan 9, 2020 · 6 comments · Fixed by #195

Comments

@trieloff
Copy link
Collaborator

trieloff commented Jan 9, 2020

Thanks for your help.
But sorry, I still end up in an infinite loop with version 4.0.3

Originally posted by @AndyOGo in #185 (comment)

@trieloff trieloff added the bug label Jan 9, 2020
@AndyOGo
Copy link
Contributor

AndyOGo commented Jan 9, 2020

Thanks @trieloff for opening another issue.

So far I have no reproduction available, I added one more test schema to my repo with a self-referencing schema simply called node.json.
But it works all fine, I committed the result too:
https://github.com/axa-ch/cyclic-schemas-test/tree/master/docs

I need to search our repo further, hope I can distill a reproduction soon...

@trieloff
Copy link
Collaborator Author

Thanks Andy, as soon as you can reliably reproduce the issue I can start debugging.

@AndyOGo
Copy link
Contributor

AndyOGo commented Jan 11, 2020

@trieloff I found a public repo of ours, which is failing, below is my PR with an install of 4.0.3:
axa-ch/json-logic-js#19

All schemas are here:
https://github.com/axa-ch/json-logic-js/tree/master/schemas

trieloff added a commit that referenced this issue Jan 13, 2020
using the json-logic-js as a dev dependency for testing

see #194
trieloff added a commit that referenced this issue Jan 13, 2020
The schema loader would wrap objects that have already been wrapped again. This was especially an
issue with recursive references, where it could lead to endless loops.

fixes #194
trieloff pushed a commit that referenced this issue Jan 14, 2020
## [4.0.4](v4.0.3...v4.0.4) (2020-01-14)

### Bug Fixes

* **cli:** do not exit after creating readme.md ([cb7d012](cb7d012))
* **cli:** make the -n or --no-readme option work again ([3c63c03](3c63c03))
* **loader:** guard against endless wrapping ([dd1f7f6](dd1f7f6)), closes [#194](#194)
@trieloff
Copy link
Collaborator Author

🎉 This issue has been resolved in version 4.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@AndyOGo
Copy link
Contributor

AndyOGo commented Jan 14, 2020

Thanks for handling it so quickly 👍
Works like a charm now 😄

@trieloff
Copy link
Collaborator Author

I ran into the same issue in my projects, so that was an additional motivation.

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

Successfully merging a pull request may close this issue.

2 participants