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

fprime-util -p Does Not Respect CWD #45

Closed
LeStarch opened this issue Feb 4, 2022 · 1 comment · Fixed by #57
Closed

fprime-util -p Does Not Respect CWD #45

LeStarch opened this issue Feb 4, 2022 · 1 comment · Fixed by #57
Labels
bug Something isn't working

Comments

@LeStarch
Copy link
Collaborator

LeStarch commented Feb 4, 2022

F´ Version
Affected Component

Problem Description

When running with fprime-util -p it searches for a build cache starting at that directory (e.g -p). It does not look for a build cache from cwd. Thus -d and -p are not inverses.

cd <component>
fprime-util build -d <path to deployment> # builds with deployment
cd <deployment>
fprime-util build -p <path to component> # Does not build with deployment

This should be the case because to build with the detected deployment of a component is:

cd <component>
fprime-util build #Detected deployment
@LeStarch LeStarch added the bug Something isn't working label Feb 4, 2022
@Joshua-Anderson
Copy link
Contributor

I intentionally designed this behavior - though whether it's correct or not is rightly up for debate.

My assumption was that most components will live within the folder of their deployment... which is often but not necessarily true.

I also assumed that users would primarily be using the -p argument from outside of the deployment directory, I.E. at the root directory of your project, in which case using the CWD for the deployment directory would be wrong.

How often are users in the deployment directory and using the -p directory to build an out of deployment directory component? It seems to me like assuming the component is within the deployment is more likely to be correct than assuming the user's CWD is within the deployment.

I don't have strong opinions here, it's seems like determining the intended deployment directory is a problem that doesn't have a perfect solution.

LeStarch added a commit to LeStarch/fprime-tools that referenced this issue Apr 28, 2022
LeStarch added a commit to LeStarch/fprime-tools that referenced this issue Apr 28, 2022
kevin-f-ortega pushed a commit that referenced this issue Apr 28, 2022
* lestarch: search deployments from cwd. Fixing issue #45

* lestarch: formatting for #45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants