Open kieran-flex opened 2 months ago
hmmm... so runtime vs loading is triggered based on when we think the full app has been eagerly loaded... this might be different for how grape hooks into routes... Does our app have eager_loading for rails, I would assume it loads all of your grape files at that time.... I know some graphql libraries have problems where most of the graph is defining a schema and not used at run time... I don't use grape, so I might need a small sample app or PR on the coverband_rails demo app reproducing the issue for me to fix it.
Describe the bug When doing
"mount API:RootAPI => '/'
at startup to mount all of our APIs in Rails (we use Grape for the actual APIs) then it cascades through all of the initialisation code in those Controllers an related code and includes them in coverage but marks it all as runtime. It then makes it really hard to tell if an API is actually used because it says lots of code is used at runtime, when really none is and it is all just load time. How is load time versus runtime worked out? Can I force anything that happens during route mounting to be considered load time?Screenshots below: