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

mbed-cli: 1.9.1 -> 1.10.2 #68947

Closed
wants to merge 2 commits into from
Closed

Conversation

@rvolosatovs
Copy link
Contributor

rvolosatovs commented Sep 16, 2019

Motivation for this change

Upstream update
mbed-os-tools is added as dependency to mbed-cli
Replaces #53956
Depends on #67730 (I will remove the [WIP] from the title, once that PR is merged and this one is rebased)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@rvolosatovs rvolosatovs requested a review from FRidh as a code owner Sep 16, 2019
@ofborg ofborg bot added the 6.topic: python label Sep 16, 2019
@rvolosatovs rvolosatovs force-pushed the rvolosatovs:update/mbed-cli branch 2 times, most recently from 89b2194 to 60d6ba2 Sep 17, 2019
@rvolosatovs rvolosatovs mentioned this pull request Oct 10, 2019
7 of 10 tasks complete
@tomfitzhenry
Copy link
Contributor

tomfitzhenry commented Nov 23, 2019

@rvolosatovs , is this still WIP?

@rvolosatovs
Copy link
Contributor Author

rvolosatovs commented Nov 25, 2019

Still waiting for #67730 to be merged...

@rvolosatovs rvolosatovs force-pushed the rvolosatovs:update/mbed-cli branch from 60d6ba2 to c352e79 Jan 10, 2020
@rvolosatovs rvolosatovs requested a review from jonringer as a code owner Jan 10, 2020
@rvolosatovs rvolosatovs force-pushed the rvolosatovs:update/mbed-cli branch from c352e79 to 58295f4 Jan 10, 2020
@rvolosatovs rvolosatovs changed the title [WIP] mbed-cli: 1.9.1 -> 1.10.1 mbed-cli: 1.9.1 -> 1.10.2 Jan 10, 2020
pkgs/development/tools/mbed-cli/default.nix Outdated Show resolved Hide resolved
pip
pyserial

# Some of mbed-os dependencies.

This comment has been minimized.

Copy link
@rvolosatovs

rvolosatovs Jan 10, 2020

Author Contributor

So basically mbed-cli tries to run pip to install project dependencies.
Essentially all projects using this application will have a dependency on mbed-os, and so the following is a list of most of it's dependencies(https://github.com/ARMmbed/mbed-os/blob/master/requirements.txt) - the rest do not have a Nix package.
Not fancy and will probably break if the mbed-os dependencies change.

My idea is that users could set up venv with the missing dependencies and then use the mbed-cli package with the rest.

Any (simple) idea how to handle this better?

This comment has been minimized.

Copy link
@jonringer

jonringer Jan 10, 2020

Contributor

for packages that require specific dependencies which don't reflect the current python ecosystem you should do something similar to aws-sam-cli

Two things that are special about it:

  • it's not in python-packages, so it can't be imported
  • it's only used as an application

If you still need to use the package in python-modules, then you will have issues

This comment has been minimized.

Copy link
@jonringer

jonringer Jan 10, 2020

Contributor

however, for the update story, I don't think that would be a supported usecase as it expects to be able to write to site-packages

@rvolosatovs rvolosatovs requested a review from jonringer Jan 10, 2020
@rvolosatovs
Copy link
Contributor Author

rvolosatovs commented Jan 10, 2020

@GrahamcOfBorg build mbed-cli

@rvolosatovs
Copy link
Contributor Author

rvolosatovs commented Jan 10, 2020

FTR, so far I did not have much success using the Nix package and myself resort to using a Docker image:
https://github.com/rvolosatovs/infrastructure/blob/6d6ef8f9694efd8df4954552355f5ae4900dd7b9/nixpkgs/external/dockerfiles/Dockerfile.mbed#L1-L25
https://github.com/rvolosatovs/infrastructure/blob/6d6ef8f9694efd8df4954552355f5ae4900dd7b9/nixpkgs/overlays.nix#L197-L201

Ideally I would want to be able to just add the mbed package directly in shell.nix of my projects and use it, but the pip (obviously) fails and compilation of projects also failed for me before. Have not tested yet with the version in this PR.

I don't really know how to make it work.

@rvolosatovs rvolosatovs force-pushed the rvolosatovs:update/mbed-cli branch from 58295f4 to d1b9c01 Jan 10, 2020
@rvolosatovs
Copy link
Contributor Author

rvolosatovs commented May 22, 2020

Closing this, since not clear how to proceed

@jonringer
Copy link
Contributor

jonringer commented May 27, 2020

this could potentially work with buildFHSUserEnv, but I don't have much experience using that utility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.