nasa / fprime

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

Single quote in project parent folder causes installation errors #2558

Closed TSKoduru closed 6 months ago

TSKoduru commented 6 months ago
F´ Version v3.4.3
Affected Component Installation/Project Setup

Problem Description

If you name the parent directory of your project such that it has a single quote in it, you'll run into an error when you try to run 'fprime-util generate' during basic project setup.

Context / Environment

Operating System: Linux
CPU Architecture: x86_64
Platform: Linux-5.15.133.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
Python version: 3.10.12
CMake version: 3.22.1
Pip version: 24.0
Pip packages:
    fprime-tools==3.4.4
    fprime-gds==3.4.3
    fprime-fpp-*==2.1.0a3

How to Reproduce

  1. Create a parent directory containing a single quote (For instance, "F'")
  2. Follow the basic project setup guide located here: https://fprime-community.github.io/fprime-tutorial-hello-world/docs/NewProject.html
  3. Once you hit 'fprime-util generate', you should soon see an error about an unterminated quote from one of the fprime dependencies.

Expected Behavior

Ideally, you'd have a project set up properly in your virtual environment.

thomas-bc commented 6 months ago

Note: having a space in the parent directory also causes issues.

thomas-bc commented 6 months ago

My take: quotes and spaces really aren’t too advisable to use in paths, we can’t guarantee tools like CMake and whatnot are going to handle them well. So I don’t know that there’s a lot we can guarantee ourselves, and I don’t necessarily want to go down the route of supporting those patterns. However, we could have in fprime-bootstrap a big bright red warning “parent path to your project has dangerous characters” or something

TSKoduru commented 6 months ago

Yeah, that's honestly going to be the best bet. At the very least, we could have a warning on the NewProject website letting you know about the potential issues with certain project names.

thomas-bc commented 6 months ago

To be fixed by https://github.com/nasa/fprime/issues/2570