FHIR Chat · Firely Terminal: Issues install local package · tooling

Stream: tooling

Topic: Firely Terminal: Issues install local package


view this post on Zulip Patrick Werner (Nov 15 2021 at 08:50):

We started to use firely terminal in our IG pipelines to install needed packages. Doing this we found 3 issues:

  • fhir install --file throws an error if the local package isn't known to the package servers:
fhir install Downloads/term_0.2.0.tgz --file                                                                                          ✔  4383  17:46:50
Added: molit.fhir.common-terminology 0.2.0.
Restore could not be completed.
Package not found: molit.fhir.common-terminology 0.2.0

view this post on Zulip Patrick Werner (Nov 15 2021 at 08:52):

  • fhir bake creates snapshots with missing/wrong ids on elements (@Alexander Zautke @Chris Moesel @Yannick Börner )

view this post on Zulip Patrick Werner (Nov 15 2021 at 08:52):

see: https://chat.fhir.org/#narrow/stream/215610-shorthand/topic/Bug.3A.20No.20element.20found.20at.20path

view this post on Zulip Patrick Werner (Nov 15 2021 at 08:53):

  • fhir install installs packages in: /root/.local/share/.fhir instead of /root/.fhir which then lets sushi & IG publisher fail (can be fixed with a symlink, would be nice of firely terminal always would use the correct/same folder as sushi/IG publisher

view this post on Zulip Martijn Harthoorn (Nov 17 2021 at 09:26):

I vaguely remember we had a specific reason to use .local/share/, I think it had to do with permissions.

view this post on Zulip Martijn Harthoorn (Nov 17 2021 at 09:27):

And of course there are a lot of users that now have their cache in there, which I cannot just bust. But I'll check what we can do. Maybe make it configurable.

view this post on Zulip Ewout Kramer (Nov 17 2021 at 09:29):

Wouldn't the Sushi/IG publisher have the same permission problems then?

view this post on Zulip Ewout Kramer (Nov 17 2021 at 09:30):

Would it be possible to use the same directory across tools and let the tools create the symlink so both situations work?

view this post on Zulip Grahame Grieve (Nov 17 2021 at 09:46):

there is a spec, @Martijn Harthoorn even wrote it. And that's root/.fhir

view this post on Zulip Ewout Kramer (Nov 17 2021 at 09:55):

I tried to check it out myself, but cannot find it. Where is it?

view this post on Zulip Ewout Kramer (Nov 17 2021 at 09:56):

I know about https://confluence.hl7.org/display/FHIR/FHIR+Package+Cache and https://confluence.hl7.org/display/FHIR/NPM+Package+Specification, but cannot find that location...

view this post on Zulip Martijn Harthoorn (Nov 17 2021 at 10:04):

https://confluence.hl7.org/display/FHIR/FHIR+Package+Cache
works for me.

view this post on Zulip Martijn Harthoorn (Nov 17 2021 at 10:24):

@Grahame Grieve , you're right. I can't remember why we changed in FT. I vaguely remember some Linux guy told me that I should not put it directly under ~/, but apparently I forgot to bring it up for discussion.

view this post on Zulip Grahame Grieve (Nov 17 2021 at 22:05):

well, it's kind of late to change it now - There's a lot of tooling out there following the spec

view this post on Zulip Patrick Werner (Nov 18 2021 at 10:58):

afaik there is no difference in permissions between ~ and ~/.local
.local ist normally was brought up by GNOME and is for "non-user-generated data" but for program data. I think firely terminal just should use ~/.local - how it is stated in the FHIR spec.

view this post on Zulip Martijn Harthoorn (Nov 25 2021 at 08:02):

But the spec does not mention .local

view this post on Zulip Alexander Zautke (Nov 25 2021 at 11:19):

+1 for changing it to the folder mentioned in the spec, so "/~/.fhir/packages" (not .local!)

view this post on Zulip Alexander Zautke (Nov 25 2021 at 11:21):

In case someone needs to debug the issue and ends up here... the symlink can be created with "ln -s ~/.local/share/.fhir ~/.fhir".

view this post on Zulip Patrick Werner (Nov 25 2021 at 13:35):

Martijn Harthoorn said:

But the spec does not mention .local

my bad, sorry i meant ~/.fhir

view this post on Zulip Martijn Harthoorn (Nov 25 2021 at 13:36):

ok. So I think everyone agrees.
I have made a new release for Firely Terminal with that path for linux. (2.5.0-beta-2)

view this post on Zulip Martijn Harthoorn (Nov 25 2021 at 13:36):

(the local package issue is on our radar, but not fixed yet)


Last updated: Apr 12 2022 at 19:14 UTC