Closed daltonmatos closed 6 years ago
Hello 🙂
Have you seen CONTRIBUTING.md? You shouldn't provide any make goal, the default one will build everything. Or alternatively you indeed need to provide 3 goals, deps
, js
and browserpass
.
Hello @maximbaz,
yes, I saw the contributing docs. Quoting the docs:
If you only want to download dependencies, build front-end or backend code, run one of the following: docker run --rm -v "$(pwd)":/browserpass browserpass-dev deps docker run --rm -v "$(pwd)":/browserpass browserpass-dev js docker run --rm -v "$(pwd)":/browserpass browserpass-dev browserpass
the docs says to run ONE of the commands, this made me understand that to build the backend code I should run only the last command.
Maybe we could clarify the docs and say that if we want to build only one part of the project we need to always run the deps
target. What do you think?
Well, not always, right - only the first time 🙂 If you are developing the backend code and constantly rebuilding it, you don't want to slow down yourself by always re-running deps
target.
Maybe I should write that not specifying a make goal is the preferred approach?
Indeed it makes sense, in an every day development scenario. In fact, the slowness depends on our build tools. For instance, if the deps
is smart enough to not re-build every timeit is called, the slowness will be imperceptible.
I think the best is indeed suggest that only the default targets be used. If someone is developing, he/she will probably poke around in the Makefile and find out that there are more targets available to be called, if needed.
Thanks,
Hello @maximbaz and @dannyvankooten !
The docs has instruction on buildng the project using docker, but the Makefile seems to have some targets with missing dependencies.
Exact steps to reproduce the problem
make clean
)node_modules
andvendor
(rm -rf node_modules/ vendor/
)docker build -t browserpass-dev .
)docker run --rm -v "$(pwd)":/browserpass browserpass-dev browserpass
)What should happen?
The code should build the final binary,
browserpass
.What happened instead?
the build fails with this error:
The problem is that the target
browserpass
does not depend on the targetdeps
, so to build the backend code I actually need to run 2 commands:Since the docs says that it's sufficient to run only the second command to build the backend code, it should automatically dun the
deps
target.Also, even with a succsessfull build of the backend, the
install.sh
fails withBut if I build the
js
target,install.sh
now works.Are you interested in receiving a PR to fix this?
Thanks a lot for your project.