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

Build failure when including a - in a component's name #2802

Closed
keck-in-space opened this issue Jul 11, 2024 · 5 comments
Closed

Build failure when including a - in a component's name #2802

keck-in-space opened this issue Jul 11, 2024 · 5 comments
Labels
bug Easy First Issue An issue that should be straight forward to implement, and easily tested via CI. F´ Tools Issues pertaining to the F´ tools help wanted

Comments

@keck-in-space
Copy link
Contributor

F´ Version 3.4.4
Affected Component NA

Problem Description

When creating a new component, you can name it as you please, but if the name contains a - it will fail to build. The component name should be given parameters of acceptable names to prevent this issue from occurring.

Context / Environment

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

Operating System: Linux
CPU Architecture: x86_64
Platform: Linux-5.15.0-113-generic-x86_64-with-glibc2.29
Python version: 3.8.10
CMake version: 3.16.3
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. Run fprime-util new --component
  2. Give the component a name containing a dash, for example: test-component-with-dashes
  3. cd test-component-with-dashes, then attempt to build using fprime-util build
  4. View error:
CMake Error at fprime/cmake/utilities.cmake:586 (message):
-- Configuring incomplete, errors occurred!
  [sub-build] Failed to execute: info-cache/fpp_locs:

  fpp-locate-defs

  
  /home/username/project/Components/test-component-with-dashes/test-component-with-dashes.fpp:3.26


      active component test-component-with-dashes {
                           ^

  error: { expected

Expected Behavior

Either a warning or an error when attempting to create a component with an invalid name.

@thomas-bc thomas-bc added help wanted Easy First Issue An issue that should be straight forward to implement, and easily tested via CI. F´ Tools Issues pertaining to the F´ tools labels Jul 11, 2024
@thomas-bc
Copy link
Collaborator

@thomas-bc
Copy link
Collaborator

thomas-bc commented Jul 11, 2024

Since fprime-util new --project is going away in favor of fprime-boostrap project, we likely should simply add - to the list of invalid characters in the utility function. Should be a one liner, if anyone wants to make the contribution! :)

@keck-in-space
Copy link
Contributor Author

Thanks @thomas-bc, I opened a PR here: nasa/fprime-tools#209

@thomas-bc
Copy link
Collaborator

Thank you!

@keck-in-space
Copy link
Contributor Author

Thanks for pointing me in the right direction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Easy First Issue An issue that should be straight forward to implement, and easily tested via CI. F´ Tools Issues pertaining to the F´ tools help wanted
Projects
None yet
Development

No branches or pull requests

2 participants