Stream: committers
Topic: Build single Resource or Source/dir
Gino Canessa (Jun 06 2019 at 21:34):
Hi everyone, I am looking at the build tool and was wondering if there's any way to specify which resources to build.
The use-case I am looking at is working with a specific area of the spec on a local box.
In the documentation (http://wiki.hl7.org/index.php?title=FHIR_Build_Process), it appears the only option to reduce the build is to exclude the web/archives, which made no significant change on my system.
Being able to skip generating/validating resources that haven't changed would be a large quality of life improvement.
Reading through the logs on my system, removing the build/validation steps for resources not of interest would cut ~90% of the build time.
My first thought was a parameter to indicate which area/s are of interest. I was starting to trace the build process to see if it would be (relatively) straightforward, but am unfamiliar with these tools and quickly realized that asking here would be far better.
Thanks!
Lloyd McKenzie (Jun 06 2019 at 22:08):
The problem is that every resource can reference every other resource through extensions and any Reference or Reference<any> link. We've explored partial builds and the build process should only build the things that have changed, but it's still somewhat heavy. If your local system is super slow, you can always try pushing a branch and see if it builds on the server.
Gino Canessa (Jun 06 2019 at 22:16):
I assumed it was something along those lines. I was hoping that I could pay the tax once (do a full build), then explicitly state that only resource 'x' has changed so that everything else can just be left alone.
It is fairly painful right now since I'm working from a laptop, but I assume much more reasonable on a normal system (~15 minutes without validation, ~35 with it). Just had the thought while waiting on a build :-)
Gino Canessa (Jun 06 2019 at 22:17):
(the without validation is because an error kicks me out)
Lloyd McKenzie (Jun 06 2019 at 22:27):
I hear your pain. Your times are pretty consistent with what the rest of us experience.
Grahame Grieve (Jun 07 2019 at 03:44):
the build finishes before validation starts. so you can be looking at output before then
Grahame Grieve (Jun 07 2019 at 03:45):
the partial build is unreliable, btw, because the dependency tracking is not done (and it isn't done because it's too hard)
Grahame Grieve (Jun 07 2019 at 03:46):
I see that there is already a runtime parameter -resource [Type] that does what you want
Gino Canessa (Jun 07 2019 at 14:46):
Thanks Grahame, I did not see that anywhere it makes life a lot better!
Last updated: Apr 12 2022 at 19:14 UTC