fips icon indicating copy to clipboard operation
fips copied to clipboard

Working with projects outside the fips folder hierarchy is broken

Open SeeNoBee opened this issue 3 years ago • 3 comments

Functions like get_build_root_dir and get_deploy_root_dir works with project name only and suppose project to be inside fips workspace. Errors are produced when it tries to get 'local' setting in case of project located outside. I've made workaround allowing this functions to work directly with directories leaving the possibility to work with names. Is that new design direction or regression?

SeeNoBee avatar May 05 '22 16:05 SeeNoBee

I'm actually surprised that projects outside the workspace directory ever worked, that definitely wasn't intended :)

The new 'local' setting was added mainly to put the build output into the main project directory (under fips-files/build and fips-files/deploy) so that the build output is accessible in situations where accessing a parent directory isn't allowed (I think I stumbled over such problems in CI services).

What errors are you seeing, and how does your directory structure look like (e.g. where are those external projects, and how do you tell fips to use those).

I can promise, but maybe if its an easy fix without breaking the new 'local' feature.

floooh avatar May 06 '22 15:05 floooh

The error looks like [ERROR] 'path_to_project/fips/proj_name' is not a valid project directory. Error appears when it tries to get 'local' property from proj_dir constructed by itself using proj_name only. The folder structure looks like this:

path_to_project
│   README.md
│   ...
└───proj_dir
│   │   fips
│   │   fips.cmd
│   │   fips.yml
│   └───fips-verbs
│   └───src
│   │  ...
└───fips
│   └───fips
│   └───fips-build
│   └───fips-deploy
│   └───fips-glfw
│   └───fips-emsdk
│   └─── ...
└─── ...

So that custom fips python script (called by fips.cmd) in proj_dir imports fips from workspace located in parent folder and execute fips.run(path_to_project/fips, path_to_project/proj_dir, sys.argv).

SeeNoBee avatar May 06 '22 18:05 SeeNoBee

But functions like get_build_root_dir and get_deploy_root_dir stop using proj_dir directly and start to use proj_name only instead.

SeeNoBee avatar May 06 '22 18:05 SeeNoBee