gematik / codfsh

codfsh is a VS Code Extension to support compilation and validation of FHIR profile definitions. Short Hand files (.fsh) can be compiled and validated easily with Sushi and HAPI validator
Other
6 stars 1 forks source link

Config file not loaded on Ubuntu #26

Open HendrikGematik opened 1 year ago

HendrikGematik commented 1 year ago

config file not loaded in ubuntu but path to settings is working dev@FHIR:~$ more /home/dev/.fhir/settings/codfsh-config.yaml`

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

image

HendrikGematik commented 1 year ago

Console starts with the following output and then tries to install all packages again:

fhir cache
Length cannot be less than zero. (Parameter 'length')

child process exited with code 255
SvenSommer commented 9 months ago

Hello @HendrikGematik,

Based on the issue you're encountering with the codfsh extension on Ubuntu, it seems like there might be a configuration or environment-specific problem. To address this and potentially simplify your development process, I recommend using the preconfigured devcontainer setup we have in the spec-TemplateForSimplifierProjects repository. This setup includes everything you need for FHIR development, including the codfsh extension, and should help avoid environment-specific issues like the one you're experiencing.

Using the Devcontainer with Preconfigured codfsh

The devcontainer setup encapsulates the development environment in a Docker container, ensuring consistency across different systems. Here's how you can use it:

  1. Clone the .devcontainer Folder: First, clone or download the .devcontainer folder from the spec-TemplateForSimplifierProjects repository. You can find it here: spec-TemplateForSimplifierProjects/.devcontainer.

  2. Add .devcontainer to Your Project: Place the .devcontainer folder in the root of your project. This folder contains all the necessary configuration files for the devcontainer environment.

  3. Reopen Your Project in the Container: Open your project in VSCode. You should be prompted to reopen it in a container. If not, use the command palette (Ctrl+Shift+P) and select "Remote-Containers: Reopen in Container". VSCode will build the Docker container based on the configuration and use it as your development environment.

  4. Test the codfsh Extension: Once your project is open in the devcontainer, the codfsh extension should be preconfigured and ready to use. Test it to see if the issue persists.

Addressing the "Length cannot be less than zero" Error

Regarding the error Length cannot be less than zero. (Parameter 'length') and the issue with fhir cache, this might be related to a specific bug or misconfiguration in the environment. Using the devcontainer should help bypass this issue as it provides a standardized environment. However, if the problem persists even in the devcontainer, it might require a deeper investigation into the codfsh extension's code or the specific commands being executed.

I hope this approach helps resolve the issues you're facing. Please let me know if you encounter any problems with setting up or using the devcontainer, or if the issue with codfsh persists in this environment.