-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove infinite loops in cases with circular dependencies (#79)
* Push structure definitions after setting metadata, fix tests * Add tests for circular references * Add debug statement when structure definition is not complete * Add break to debug case in incrementCounts * Address feedback from review * Add warning when parent is incomplete * Fix merge issues in test after rebase * Add tests to ensure circular issues are logged Also adds enhancements to loggerSpy to support this. Co-authored-by: Chris Moesel <[email protected]>
- Loading branch information
Showing
8 changed files
with
272 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { logger } from '../../src/utils'; | ||
|
||
export function withDebugLogging(fn: () => any) { | ||
const originalLevel = logger.level; | ||
logger.level = 'debug'; | ||
try { | ||
fn(); | ||
} finally { | ||
// make sure we set the logger back so we don't mess up other tests | ||
logger.level = originalLevel; | ||
} | ||
} |