nasa / fprime

F´ - A flight software and embedded systems framework
https://fprime.jpl.nasa.gov
Apache License 2.0
9.95k stars 1.28k forks source link

F´ Builds Don't Detect Correctly #2685

Open LeStarch opened 2 months ago

LeStarch commented 2 months ago
F´ Version
Affected Component

Problem Description

If a user does the following:

git clone https://github.com/nasa/fprime.git fprime-2
cd fprime-2
fprime-util generate

The system fails.

https://github.com/nasa/fprime-tools/blob/c15253c98ffc816bcca24db43f24c4c070b7c5ff/src/fprime/fbuild/settings.py#L26-L38

That code makes the assumption that fprime is in a folder called "fprime" and fails otherwise.

Context / Environment

Execute fprime-util version-check and share the output.

Operating System: Darwin
CPU Architecture: arm64
Platform: macOS-14.4.1-arm64-arm-64bit
Python version: 3.11.0
CMake version: 3.29.0
Pip version: 22.3
Pip packages:
    fprime-tools==3.4.4
    fprime-gds==3.4.4a1
    fprime-fpp-*==2.1.0a5

How to Reproduce

See description.

Expected Behavior

This should work in the following cases:

  1. fprime named something else
  2. fprime parallel to another fprime checkout

Here is what it should do:

  1. Check current directory for cmake/FPrime.cmake. If this exists, then the current directory is "fprime" (e.g. framework_path)
  2. Else:
    1. Glob match */cmake/FPrime.cmake
    2. If multiple hits: produce error. Must manually specify framework_path
    3. If one match: this is "fprime"
    4. If zero matches: cd to parent and recurse from 1 above