Allow starting IOC without PVA#186
Conversation
There seems to be no need to load the DBD and DSO early, so doing it just before iocInit allows a programmatic switch to enable/disable it.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #186 +/- ##
==========================================
+ Coverage 88.18% 88.30% +0.11%
==========================================
Files 15 15
Lines 1270 1274 +4
==========================================
+ Hits 1120 1125 +5
+ Misses 150 149 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Araneidae
left a comment
There was a problem hiding this comment.
Short sweet and to the point, but I suggest improving the error handling.
We don't need the newest version of epicscorelibs. Fix attempting to use cothread on Windows. Import registerAllRecordDeviceDrivers ourselves so we can do error checking the same way as other functions, without relying on epicscorelibs or needing additional error handling
| device.dispatcher = dispatcher | ||
|
|
||
| if enable_pva: | ||
| dbLoadDatabase('pvxsIoc.dbd', pvxslibs.path.dbd_path, None) |
There was a problem hiding this comment.
Is there any reason we shouldn't defer all dbd and lib loading until iocInit?
There was a problem hiding this comment.
With this PR there is no longer any lib loading anywhere except in iocInit().
You must load the DBD files before creating records, otherwise epicsdbbuilder / EPICS itself doesn't know what to do with the record entries. So I believe we must do that as early as possible.
For research I tried moving the DBD loading into this function, and it results in a segmentation fault as soon as you try and create a record (presumably EPICS is attempting to call some kind of validation function related to the DBD and doesn't have proper null checks somewhere)
There seems to be no need to load the DBD and DSO early, so doing it just before iocInit allows a programmatic switch to enable/disable it.
Fixes #185