[SERVER-38446] idlc.py fails to report errors correct during dependency analysis Created: 06/Dec/18  Updated: 29/Oct/23  Resolved: 18/Dec/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.1.7

Type: Bug Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Mark Benvenuto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 2018-12-31
Participants:

 Description   

idlc.py fails to report errors correctly during dependency analysis if the idl file has an error.

idlc.py reports that it failed to get dependencies with a None de-reference instead of reporting the errors discovered during idl file load.

Example:

Traceback (most recent call last):
  File "buildscripts/idl/idlc.py", line 95, in <module>
    main()
  File "buildscripts/idl/idlc.py", line 88, in main
    success = idl.compiler.compile_idl(compiler_args)
  File "D:\mongo\buildscripts\idl\idl\compiler.py", line 206, in compile_idl
    _write_dependencies(parsed_doc.spec)
  File "D:\mongo\buildscripts\idl\idl\compiler.py", line 119, in _write_dependencies
    if not spec.imports:
AttributeError: 'NoneType' object has no attribute 'imports'Failed on node: build\v1\mongo\db\matcher\schema\encrypt_schema_gen.h 



 Comments   
Comment by Githook User [ 18/Dec/18 ]

Author:

{'username': 'markbenvenuto', 'email': 'mark.benvenuto@mongodb.com', 'name': 'Mark Benvenuto'}

Message: SERVER-38446 idlc.py fails to report errors correct during dependency analysis
Branch: master
https://github.com/mongodb/mongo/commit/9af799a2ea8419e5836cf7c10e45872b5b79bf0e

Generated at Thu Feb 08 04:48:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.