Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ogma-cli: Installation instructions do not mention cabal update step #100

Closed
iftahnaf opened this issue Sep 21, 2023 · 9 comments
Closed
Assignees
Labels
CR:Status:Closed Admin only: Change request that has been completed CR:Type:Bug Admin only: Change request pertaining to error detected
Milestone

Comments

@iftahnaf
Copy link

Hi,

When trying to install ogma in a Dockerfile, running cabal v1-install alex happy results:

Config file path source is default config file.
Config file /home/ros/.cabal/config not found.
Writing default configuration to /home/ros/.cabal/config
Warning: The package list for '[hackage.haskell.org](http://hackage.haskell.org/)' does not exist. Run 'cabal
update' to download it.
cabal: There is no package named 'alex'.
There is no package named 'happy'.
You may need to run 'cabal update' to get the latest list of available
packages.
@iftahnaf iftahnaf changed the title error installation in Dockerfile: cabal: There is no package named 'alex' error installation in a Dockerfile: cabal: There is no package named 'alex' Sep 21, 2023
@ivanperez-keera
Copy link
Member

Thanks! I'll fix this.

By the way, in case it helps, I try to keep this dockerfile up-to-date with every release (I'm selecting the lines that would apply whether you are aiming for fprime, cfs or ros): https://github.com/nasa/ogma/blob/develop-workflows-icarous/workflows/cfs-icarous/Dockerfile#L1-L59

@iftahnaf
Copy link
Author

Thanks.
It helps for the ogma integration in the fprime - ros bridge development environment.

@ivanperez-keera ivanperez-keera changed the title error installation in a Dockerfile: cabal: There is no package named 'alex' ogma-cli: Installation instructions do not mention cabal v1-update. Nov 22, 2023
@ivanperez-keera
Copy link
Member

ivanperez-keera commented Nov 22, 2023

Description

The installation instructions in the README do not mention the cabal update step. This is confusing users unfamiliar with Haskell, since it's not obvious that cabal should have to be updated before installing Ogma.

Type

  • Bug: installation instructions are incomplete.

Additional context

None.

Requester

  • Iftach Naftaly (Lulav Space)

Method to check presence of bug

The issue is with the documentation. There is no good, simple automated way to check that it is correct.

Because it's not a programming issue, visual inspection is OK.

Expected result

The README's installation instructions list the update step prior to installation.

Desired result

The README's installation instructions list the update step prior to installation.

Proposed solution

Modify the installation instructions in README.md to include the cabal update step.

Further notes

None.

@ivanperez-keera ivanperez-keera added CR:Status:Initiated Admin only: Change request that has been initiated CR:Type:Bug Admin only: Change request pertaining to error detected labels Nov 22, 2023
@ivanperez-keera ivanperez-keera changed the title ogma-cli: Installation instructions do not mention cabal v1-update. ogma-cli: Installation instructions do not mention cabal update step. Nov 22, 2023
@ivanperez-keera ivanperez-keera changed the title ogma-cli: Installation instructions do not mention cabal update step. ogma-cli: Installation instructions do not mention cabal update step Nov 22, 2023
@ivanperez-keera
Copy link
Member

Change Manager: Confirmed that the issue exists.

@ivanperez-keera ivanperez-keera added CR:Status:Confirmed Admin only: Change request that has been acknowledged by the change manager and removed CR:Status:Initiated Admin only: Change request that has been initiated labels Nov 22, 2023
@ivanperez-keera
Copy link
Member

Technical Lead: Confirmed that the issue should be addressed.

@ivanperez-keera ivanperez-keera added CR:Status:Accepted Admin only: Change request accepted by technical lead and removed CR:Status:Confirmed Admin only: Change request that has been acknowledged by the change manager labels Nov 22, 2023
@ivanperez-keera
Copy link
Member

Technical Lead: Issue scheduled for fixing in Ogma 1.0.12.

Fix assigned to: @ivanperez-keera .

@ivanperez-keera ivanperez-keera added CR:Status:Scheduled Admin only: Change requested scheduled and removed CR:Status:Accepted Admin only: Change request accepted by technical lead labels Nov 22, 2023
@ivanperez-keera ivanperez-keera self-assigned this Nov 22, 2023
@ivanperez-keera ivanperez-keera added this to the 1.0.12 milestone Nov 22, 2023
@ivanperez-keera ivanperez-keera added CR:Status:Implementation Admin only: Change request that is currently being implemented and removed CR:Status:Scheduled Admin only: Change requested scheduled labels Nov 22, 2023
ivanperez-keera added a commit to ivanperez-keera/ogma that referenced this issue Nov 22, 2023
The installation instructions in the README do not mention the cabal update
step. This is confusing users unfamiliar with Haskell, since it's not obvious
that cabal should have to be updated before installing Ogma.

This commit adds an update step prior to installing any tools in the
installation instructions in the README. We use the v1 variant of the command,
for consistency with the rest of the instructions.
ivanperez-keera added a commit to ivanperez-keera/ogma that referenced this issue Nov 22, 2023
@ivanperez-keera
Copy link
Member

Implementor: Solution implemented, review requested.

@ivanperez-keera ivanperez-keera added CR:Status:Verification Admin only: Change request that is currently being verified and removed CR:Status:Implementation Admin only: Change request that is currently being implemented labels Nov 22, 2023
@ivanperez-keera
Copy link
Member

Change Manager: Verified that:

  • Solution is implemented:
    • The code proposed compiles passes the tests. Details:
      Docker image:

      FROM ubuntu:trusty
      
      RUN apt-get update
      
      RUN apt-get install --yes software-properties-common
      RUN add-apt-repository ppa:hvr/ghc
      RUN apt-get update
      
      RUN apt-get install --yes ghc-8.6.5 cabal-install-2.4
      RUN apt-get install --yes libz-dev
      
      ENV PATH=/opt/ghc/8.6.5/bin:/opt/cabal/2.4/bin:$PWD/.cabal-sandbox/bin:$PATH
      
      RUN cabal update
      RUN cabal v1-sandbox init
      RUN cabal v1-install alex happy
      RUN apt-get install --yes git
      
      # We install the application first and then test it, in case any tests need to
      # run the tool.
      CMD git clone $REPO && \
          cd $NAME && \
          git checkout $COMMIT && \
          cd .. && \
          cabal v1-install $NAME/$PAT**/ --enable-tests && \
          cabal v1-install $NAME/$PAT**/ --enable-tests --run-tests -j1

      Command:

      $ docker run -e "REPO=https://github.com/ivanperez-keera/ogma" -e "NAME=ogma" -e PAT="ogma-" -e "COMMIT=94a59586aaa46765fccc67d327485940154fa811" -it ogma-test
    • The solution proposed fixes the issues described. Details:
      The issue is with the documentation. We verify the solution proposed by visual inspection.

  • Implementation is documented. Details:
    No changes needed.
  • Change history is clear.
  • Commit messages are clear.
  • Changelogs are updated.
  • Examples are updated. Details:
    No examples affected.
  • Required version bumps are evaluated. Details:
    Bump not needed (change to documentation only).

@ivanperez-keera
Copy link
Member

Change Manager: Implementation ready to be merged.

ivanperez-keera added a commit that referenced this issue Nov 22, 2023
**Description**

The installation instructions in the README do not mention the `cabal update`
step. This is confusing users unfamiliar with Haskell, since it's not obvious
that cabal should have to be updated before installing Ogma.

**Type**

- Bug: installation instructions are incomplete.

**Additional context**

None.

**Requester**

- Iftach Naftaly (Lulav Space)

**Method to check presence of bug**

The issue is with the documentation. There is no good, simple automated way to
check that it is correct.

Because it's not a programming issue, visual inspection is OK.

**Expected result**

The README's installation instructions list the update step prior to
installation.

**Solution implemented**

Modify the installation instructions in `README.md` to include the cabal update
step.

**Further notes**

None.
@ivanperez-keera ivanperez-keera added CR:Status:Closed Admin only: Change request that has been completed and removed CR:Status:Verification Admin only: Change request that is currently being verified labels Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CR:Status:Closed Admin only: Change request that has been completed CR:Type:Bug Admin only: Change request pertaining to error detected
Projects
None yet
Development

No branches or pull requests

2 participants