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

Fix: infinite loop on empty record #34

Merged
merged 1 commit into from
Apr 10, 2021
Merged

Fix: infinite loop on empty record #34

merged 1 commit into from
Apr 10, 2021

Conversation

haradzienski
Copy link
Contributor

Fixes a bug that caused the generator to go into an infinite loop when trying to generate empty record runtype.

Fixes #33, more details there.

I think the problem was caused by writeRecordType not writing anything at all if the record had no fields, since groupFieldKinds will correctly return and empty array if you pass it an empty array.

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (develop@f6a24d6). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop      #34   +/-   ##
==========================================
  Coverage           ?   92.85%           
==========================================
  Files              ?        2           
  Lines              ?       98           
  Branches           ?       11           
==========================================
  Hits               ?       91           
  Misses             ?        7           
  Partials           ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6a24d6...9a53adc. Read the comment docs.

@simenandre simenandre requested a review from runeh April 10, 2021 08:59
@runeh runeh merged commit 5596de4 into simenandre:develop Apr 10, 2021
github-actions bot pushed a commit that referenced this pull request Apr 10, 2021
# [2.0.0-alpha.4](v2.0.0-alpha.3...v2.0.0-alpha.4) (2021-04-10)

### Bug Fixes

* infinite loop on empty record ([#34](#34)) ([5596de4](5596de4))
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.0.0-alpha.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Bug: Infinite loop when trying to build an empty record runtype
4 participants