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

[nix] patch realm as a nodePackage use it from nix store, add to default nix-shell buildDependencies #7759

Merged
merged 2 commits into from May 23, 2019

Conversation

@hlolli
Copy link
Contributor

commented Mar 19, 2019

Summary:

Realm, which is called trough the ubuntu server js file, needs to be compiled in nix environment if the environment is to be pure. After this commit, it should be possible to start the shell with nix-shell --pure, I'd call this a step forward but still there's some things to be done. Preferably the ubuntuserver.js file should be generated within the nix-shell, because we don't want to use the local node_modules, rather the nix-store realm.

The hostname has been merged since I made my previous PR so I'll close that, but I realized I made a mistake, kinda, the problem is, that the nix-shell isn't provided with parameters, to merge the buildInputs from desktop or mobile, which is given a if then else statement in status-react/default.nix. I'd suggest just importing all the buildInputs from both mobile and desktop into the root environment, or alternatively, make 3 ways of starting the shell, one for desktop and one for mobile and third for both?

I'd want to continue on this and make a wrapped js file that starts the dev server, and encourage developers of the nix feature to use nix-shell --pure to make sure that it's possible to avoid the infamous "works on my computer", that's what nix can actually solve ;=)

[edit] also want to add that the global node modules has now one default.nix file, I did this to ensure that all global node module overrides are imported everywhere the same. I noticed that the genrated node2nix files were imported twice. Notebene, the latest master branch node2nix (1.6.1) must be used, some nested dep will fail when using node2nix 1.6.0 release.

Review notes (optional):

Testing notes (optional):

Platforms (optional)

  • Linux

for the realm-core http call, a macos endpoint needs to be added

Areas that maybe impacted (optional)

none

status: wip

(wip but this branch is a wip so I'd be happy to see this merged).

@status-github-bot

This comment has been minimized.

Copy link

commented Mar 19, 2019

Pull Request Checklist

  • Have you updated the documentation, if impacted (e.g. docs.status.im)?

@status-github-bot status-github-bot bot added this to REVIEW in Pipeline for QA Mar 19, 2019

@status-im-auto

This comment has been minimized.

Copy link
Member

commented Mar 19, 2019

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
28b88ca #1 2019-03-19 01:51:35 ~35 sec android-e2e 📄 log
28b88ca #1 2019-03-19 01:51:35 ~33 sec android 📄 log
@status-im-auto

This comment has been minimized.

Copy link
Member

commented Mar 19, 2019

Jenkins Builds

Click to see older builds (40)
Commit #️⃣ Finished (UTC) Duration Platform Result
28b88ca #1 2019-03-19 01:51:35 ~35 sec android-e2e 📄 log
28b88ca #1 2019-03-19 01:51:35 ~33 sec android 📄 log
28b88ca #1 2019-03-19 01:51:35 ~30 sec ios 📄 log
28b88ca #1 2019-03-19 01:51:40 ~31 sec macos 📄 log
28b88ca #1 2019-03-19 01:51:43 ~36 sec linux 📄 log
28b88ca #1 2019-03-19 01:51:44 ~33 sec windows 📄 log
8004537 #2 2019-03-19 02:20:14 ~22 min android-e2e 📄 log
✔️ 8004537 #2 2019-03-19 02:20:29 ~22 min android 📦 apk
✔️ 8004537 #2 2019-03-19 02:23:50 ~25 min ios 📦 ipa
✔️ 8004537 #2 2019-03-19 02:28:03 ~29 min windows 📦 exe
✔️ 8004537 #2 2019-03-19 02:29:58 ~31 min linux 📦 App
✔️ f02c45a #3 2019-03-19 17:40:33 ~16 min ios 📦 ipa
f02c45a #3 2019-03-19 17:44:52 ~21 min macos 📄 log
✔️ f02c45a #3 2019-03-19 17:47:29 ~23 min android 📦 apk
f02c45a #3 2019-03-19 17:47:29 ~23 min android-e2e 📄 log
✔️ f02c45a #3 2019-03-19 17:51:55 ~28 min windows 📦 exe
✔️ f02c45a #3 2019-03-19 17:53:40 ~29 min linux 📦 App
a92ecf9 #4 2019-03-20 23:27:13 ~16 min macos 📄 log
✔️ a92ecf9 #4 2019-03-20 23:27:53 ~17 min ios 📦 ipa
✔️ a92ecf9 #4 2019-03-20 23:35:03 ~24 min android 📦 apk
a92ecf9 #4 2019-03-20 23:35:23 ~24 min android-e2e 📄 log
✔️ a92ecf9 #4 2019-03-20 23:39:44 ~28 min windows 📦 exe
✔️ a92ecf9 #4 2019-03-20 23:41:26 ~30 min linux 📦 App
✔️ 38026c7 #5 2019-03-21 17:37:08 ~22 min ios 📦 ipa
✔️ 38026c7 #5 2019-03-21 17:41:19 ~26 min android-e2e 📦 apk
✔️ 38026c7 #5 2019-03-21 17:42:09 ~27 min windows 📦 exe
✔️ 38026c7 #5 2019-03-21 17:43:55 ~28 min linux 📦 App
38026c7 #5 2019-03-21 17:45:03 ~30 min macos 📄 log
✔️ 38026c7 #5 2019-03-21 17:47:10 ~32 min android 📦 apk
✔️ 700dedb #11 2019-04-01 20:24:00 ~14 min macos 📦 dmg
✔️ 700dedb #11 2019-04-01 20:26:59 ~17 min ios 📦 ipa
✔️ 700dedb #11 2019-04-01 20:29:35 ~20 min windows 📦 exe
✔️ 700dedb #11 2019-04-01 20:32:27 ~23 min linux 📦 App
700dedb #12 2019-05-02 08:06:13 ~37 sec android 📄 log
✔️ dd4093b #12 2019-05-22 14:11:01 ~23 min linux 📦 App
✔️ dd4093b #12 2019-05-22 14:11:04 ~24 min android-e2e 📦 apk
✔️ dd4093b #13 2019-05-22 14:12:03 ~24 min android 📦 apk
✔️ dd4093b #12 2019-05-22 14:12:11 ~24 min windows 📦 exe
✔️ dd4093b #12 2019-05-22 14:16:49 ~29 min ios 📦 ipa
✔️ dd4093b #13 2019-05-22 14:49:35 ~20 min macos 📦 dmg
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ e89c611 #13 2019-05-22 19:02:31 ~20 min linux 📦 App
✔️ e89c611 #14 2019-05-22 19:03:21 ~21 min android 📦 apk
✔️ e89c611 #13 2019-05-22 19:04:19 ~22 min android-e2e 📦 apk
✔️ e89c611 #14 2019-05-22 19:04:32 ~22 min macos 📦 dmg
✔️ e89c611 #13 2019-05-22 19:06:37 ~24 min windows 📦 exe
✔️ e89c611 #13 2019-05-22 19:10:17 ~28 min ios 📦 ipa
✔️ 403b489 #14 2019-05-22 21:37:49 ~15 min windows 📦 exe
✔️ 403b489 #14 2019-05-22 21:40:54 ~18 min android-e2e 📦 apk
✔️ 403b489 #15 2019-05-22 21:41:22 ~18 min macos 📦 dmg
✔️ 403b489 #15 2019-05-22 21:41:41 ~19 min android 📦 apk
✔️ 403b489 #14 2019-05-22 21:42:07 ~19 min linux 📦 App
✔️ 403b489 #14 2019-05-22 21:47:18 ~24 min ios 📦 ipa
@status-im-auto

This comment has been minimized.

Copy link
Member

commented Mar 19, 2019

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
28b88ca #1 2019-03-19 01:51:35 ~35 sec android-e2e 📄 log

@hlolli hlolli force-pushed the hlolli:nix-patch-realm branch from 28b88ca to 8004537 Mar 19, 2019

@yenda yenda requested review from PombeirP and jakubgs Mar 19, 2019

@PombeirP PombeirP force-pushed the status-im:feature/nix branch from e6dc925 to 64cda7e Mar 19, 2019

@status-github-bot status-github-bot bot moved this from REVIEW to CONTRIBUTOR in Pipeline for QA Mar 19, 2019

@hlolli hlolli force-pushed the hlolli:nix-patch-realm branch from 8004537 to f02c45a Mar 19, 2019

@PombeirP

This comment has been minimized.

Copy link
Member

commented Mar 19, 2019

After this commit, it should be possible to start the shell with nix-shell --pure

Do you get an error in feature/nix when starting with nix-shell --pure? I have to admit I haven't looked into that option yet, as I've mostly been focused on getting a minimal working version for all platforms.

@PombeirP

This comment has been minimized.

Copy link
Member

commented Mar 19, 2019

but I realized I made a mistake, kinda, the problem is, that the nix-shell isn't provided with parameters, to merge the buildInputs from desktop or mobile, which is given a if then else statement in status-react/default.nix. I'd suggest just importing all the buildInputs from both mobile and desktop into the root environment, or alternatively, make 3 ways of starting the shell, one for desktop and one for mobile and third for both?

I'm not sure I follow, the current /default.nix will import everything if you don't pass arguments to nix-shell, and you can also pass --argstr target-os android if you only want to set up an environment for Android.

@PombeirP
Copy link
Member

left a comment

Thanks for the PR! Didn't have yet enough time to go over all of it, but left a few comments/questions.

@@ -1,4 +1,6 @@
android-sdk-build-tools;28.0.1;
android-sdk-platform;android-27;
android-sdk;4333796;aa190cfd7299cd6a1c687355bb2764e4
node;10.12.0;

This comment has been minimized.

Copy link
@PombeirP

PombeirP Mar 19, 2019

Member

Couple of things:

  • in this branch, .TOOLVERSIONS will only contain tools which are not instaled through Nix
  • you mention node 10.12.0, but the yarn expression depends on node 8.x, I think that's why the macOS build is failing

This comment has been minimized.

Copy link
@hlolli

hlolli Mar 19, 2019

Author Contributor

ok, since you were callling toolversions from the node2nix script, I thought it got missing. So the nix branch should be compiled against node 8.x for now then?

This comment has been minimized.

Copy link
@hlolli

hlolli Mar 19, 2019

Author Contributor

what yarn expression are you refering to?

This comment has been minimized.

Copy link
@PombeirP

PombeirP Mar 19, 2019

Member

ok, since you were callling toolversions from the node2nix script, I thought it got missing. So the nix branch should be compiled against node 8.x for now then?

oh right, that was a mistake, I shouldn't have removed react_native_cli from .TOOLVERSIONS. I'll fixup the commit.

This comment has been minimized.

Copy link
@PombeirP

PombeirP Mar 19, 2019

Member

what yarn expression are you refering to?

yarn here is based on 8.x: https://github.com/status-im/status-react/blob/feature%2Fnix/default.nix#L34. Initially I was using node 10.x until I realized that it was causing builds to fail due a mismatch in node versions.

It's probably possible to override the yarn package to use the nodejs package we want, but there wasn't really a need to be on the latest nodejs version, so I kept it simple for this initial PR.

@hlolli

This comment has been minimized.

Copy link
Contributor Author

commented Mar 19, 2019

I'm not sure I follow, the current /default.nix will import everything if you don't pass arguments to nix-shell, and you can also pass --argstr target-os android if you only want to set up an environment for Android.

I'm refering to these lines
https://github.com/status-im/status-react/blob/feature/nix/default.nix#L55-L56

You are right, all the dependencies are fetched, but for the current shell, which is based on this expression, we wouldn't have access to the binaries of the nested derivation. Which isn't nececcarily needed. Yes it's possible to add arg like this, but I'm wondering what should the behaviour of make shell be?

Otherwise all the binaries should be called from within nix so that (in perfect world) we wouldn't need direct access to any build inputs.

Do you get an error in feature/nix when starting with nix-shell --pure? I have to admit I haven't looked into that option yet, as I've mostly been focused on getting a minimal working version for all platforms.

Don't remember if I did get an error, with this commit I'm able to run make prepare-desktop but this is just a step in the direction of being able to run make run-deskptop and node ubuntu-server.js. I don't want to make my commit too big in case it won't get merged :)

If you want a version working on all platforms, you should use nix-shell --pure to make sure your global (ubuntu?) environment isn't a factor into the success of the build, otherwise there isn't much use of nix.

@PombeirP PombeirP force-pushed the status-im:feature/nix branch from 6e2259c to 6128eeb Mar 19, 2019

@PombeirP

This comment has been minimized.

Copy link
Member

commented Mar 19, 2019

If you rebase it should fix the jenkins/prs/android-e2e build.

@PombeirP

This comment has been minimized.

Copy link
Member

commented Mar 19, 2019

(wip but this branch is a wip so I'd be happy to see this merged).

The feature/nix branch has already been tested and will likely be merged tomorrow, but would be great to have a follow-up PR focusing on improving the situation on NixOS.

@PombeirP

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

Regarding hostname, looks like the version present in nixpkgs isn't going to cut it. Here's what I get on my machine:

[nix-shell:~/src/github.com/status-im/status-react]$ hostname -i -v
gethostname()=`pedros-thinkpad-x1'
Resolving `pedros-thinkpad-x1' ...
hostname: No address associated with name

The 3.20 version in Ubuntu works just fine and returns multiple IP addresses.

UPDATE: This script is only used by the desktop build, and that part of the script is only used for Android, so I think I'll just move the code closer to the usage (so it doesn't get called) and remove hostname from default.nix.

@hlolli hlolli force-pushed the hlolli:nix-patch-realm branch from f02c45a to a92ecf9 Mar 20, 2019

@hlolli

This comment has been minimized.

Copy link
Contributor Author

commented Mar 20, 2019

I'd say I'm surprised as well to why nixpkgs includes such an old version of hostname :/ maybe there's a deeper reason for it. Also intetutils seems to have not been released for a long time since 1.9.4 http://ftp.gnu.org/gnu/inetutils/ maybe the hostname package isn't the one that should be used here.

But about my PR, there are some duplicates of build deps (ex. ncurses for tcl in desktop and root default.nix) and it isn't as pretty as it can be. But it's a base for me to do more PR's and when the behaviour gets more clear, we can reduce redundancy.

@PombeirP PombeirP force-pushed the status-im:feature/nix branch 3 times, most recently from 1d47465 to 774ad65 Mar 21, 2019

@PombeirP

This comment has been minimized.

Copy link
Member

commented Mar 21, 2019

@hlolli the Nix branch has been merged to develop and the script no longer requires hostname for our use case.

One thing I wanted to ask you, this PR builds compiled/realm.node right? We also have a copy in node_modules/react and Desktop uses that when in debug mode (for release builds it is downloading a pre-built image, which I'd like to get rid of). I'm not yet clear how these things get built and used (not very familiar with React/npm development other than basic projects).

Another thing I noticed, looks like in NixOS it is not using our Nix cache at nix-cache.status.im. Not sure why this difference of behavior to other distros, we're passing a config path in NIX_CONF_DIR: https://github.com/status-im/status-react/blob/feature%2Fadd-jenkins-docker-image/Makefile#L64. Do you have insight into that?

@hlolli

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2019

Hi @PombeirP,

yes, I'm sure it has to do with the fact that you import nixpkgs here

https://github.com/status-im/status-react/blob/feature/add-jenkins-docker-image/default.nix#L2

There could be two ways to set the channel to status's, one with env variable, otherwise directly in between the <> brackets. Let me look it up, my guess would be not to change the nix config dir, I think it's only for local root nix file.

@hlolli

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2019

Maybe you can make a short nix expression file that uses fetchFromGit and returns pkgs and not to use pkgs as argument (it may get automatically provided from the nix-shell command), and just under the {}: arguments do

let pkgs = import ./status-channel.nix {};

and then inherit pkgs like is done to children. I guess we can test it.

@hlolli

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2019

I notice the feture/nix has been merged into develop. I'll rebase the commit and request to merge to develop, and add realm.node for macos. I notice that there's different realm for desktop and mobile, for now this is only for the desktop. In nixos I get linker error for pre-built node binaries, by building it with node-gyp, this will work.

@hlolli hlolli force-pushed the hlolli:nix-patch-realm branch from a92ecf9 to 38026c7 Mar 21, 2019

@PombeirP

This comment has been minimized.

Copy link
Member

commented May 22, 2019

@hlolli If you agree with my branch (it isn't much different), I'd invite you to reset yours to origin/nix-patch-realm and force push that, and that way we can approve this PR straight away.

@PombeirP PombeirP added the nix label May 22, 2019

@PombeirP

This comment has been minimized.

Copy link
Member

commented May 22, 2019

Preferably the ubuntuserver.js file should be generated within the nix-shell, because we don't want to use the local node_modules, rather the nix-store realm.

This work is happening in #8246, so this branch will be a good base for that.

@hlolli

This comment has been minimized.

Copy link
Contributor Author

commented May 22, 2019

@PombeirP will do

@PombeirP

This comment has been minimized.

Copy link
Member

commented May 22, 2019

@hlolli regarding this in OP:

for the realm-core http call, a macos endpoint needs to be added

can you elaborate on what needs to be done?

@hlolli hlolli force-pushed the hlolli:nix-patch-realm branch from 31fa692 to e89c611 May 22, 2019

@hlolli

This comment has been minimized.

Copy link
Contributor Author

commented May 22, 2019

No this must be old, because I already have Darwin and Linux endpoints.

It's force-pushed now.

@hlolli

This comment has been minimized.

Copy link
Contributor Author

commented May 22, 2019

I didn't get any c-compilation on realm (from your branch), maybe it was cached, hopefully. The dot node realm files should work as is worst case.

@PombeirP

This comment has been minimized.

Copy link
Member

commented May 22, 2019

I didn't get any c-compilation on realm (from your branch), maybe it was cached, hopefully. The dot node realm files should work as is worst case.

I thought that was expected since we're placing the downloaded realm.node in lib/node_modules/realm/compiled/node-v64_linux_x64/realm.node. I'm not too familiar with the realm project to be honest.

@PombeirP

This comment has been minimized.

Copy link
Member

commented May 22, 2019

Tried my latest branch and got this when running make release-android:

requires-port@1.0.0 /nix/store/0pk2swrhhqf1b073xyrwpz6cr5y0jjiq-node-realm-2.26.1/lib/node_modules/realm/node_modules/requires-port
npm ERR! code E404
npm ERR! 404 Not Found: ini@1.3.5

npm ERR! A complete log of this run can be found in:
npm ERR!     /private/var/folders/k4/9md4_0b547x90zh9x5pt1d_r0000gn/T/nix-build-node-realm-2.26.1.drv-0/.npm/_logs/2019-05-22T17_47_14_642Z-debug.log
builder for '/nix/store/rbkvna5swb0slgjbxmnk3ndd6lcs3zn4-node-realm-2.26.1.drv' failed with exit code 1
error: build of '/nix/store/rbkvna5swb0slgjbxmnk3ndd6lcs3zn4-node-realm-2.26.1.drv' failed

Not sure if it's related to the change of source to the npm registry.

@hlolli

This comment has been minimized.

Copy link
Contributor Author

commented May 22, 2019

It looks to me that you've stopped all npm install for all packages.. let me look

@hlolli

This comment has been minimized.

Copy link
Contributor Author

commented May 22, 2019

This is what I got

$ make release-android
make[1]: Entering directory '/home/hlolli/forks/status-react'
lein prod-build-android
Warning: implicit middleware found: cider-nrepl.plugin/middleware 
Please declare all middleware in :middleware as implicit loading is deprecated.
Warning: implicit hook found: lein-githooks.plugin/hooks 
Hooks are deprecated and will be removed in a future version.
Updating hook:  pre-commit
Updating hook:  pre-commit
Updating hook:  pre-commit
Compiling ClojureScript...
Compiling ["index.android.js"] from ["components/src" "react-native/src/cljsjs" "react-native/src/mobile" "src" "env/prod"]...
Compiling ["index.android.js"] failed.
clojure.lang.ExceptionInfo: failed compiling file:/home/hlolli/forks/status-react/src/status_im/utils/js_resources.cljs {:file #object[java.io.File 0xac4d34b "/home/hlolli/forks/status-react/src/status_im/utils/js_resources.cljs"]}
	at clojure.core$ex_info.invokeStatic(core.clj:4739)
	at clojure.core$ex_info.invoke(core.clj:4739)
	at cljs.compiler$compile_file$fn__3702.invoke(compiler.cljc:1562)
	at cljs.compiler$compile_file.invokeStatic(compiler.cljc:1522)
	at cljs.compiler$compile_file.invoke(compiler.cljc:1498)
	at cljs.closure$compile_file.invokeStatic(closure.clj:573)
	at cljs.closure$compile_file.invoke(closure.clj:564)
	at cljs.closure$fn__5124.invokeStatic(closure.clj:653)
	at cljs.closure$fn__5124.invoke(closure.clj:647)
	at cljs.closure$fn__5052$G__5045__5059.invoke(closure.clj:521)
	at cljs.closure$fn__5128.invokeStatic(closure.clj:662)
	at cljs.closure$fn__5128.invoke(closure.clj:647)
	at cljs.closure$fn__5052$G__5045__5059.invoke(closure.clj:521)
	at cljs.closure$compile_sources$iter__5250__5254$fn__5255.invoke(closure.clj:1011)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.Cons.next(Cons.java:39)
	at clojure.lang.RT.next(RT.java:706)
	at clojure.core$next__5108.invokeStatic(core.clj:64)
	at clojure.core$dorun.invokeStatic(core.clj:3134)
	at clojure.core$doall.invokeStatic(core.clj:3140)
	at clojure.core$doall.invoke(core.clj:3140)
	at cljs.closure$compile_sources.invokeStatic(closure.clj:1007)
	at cljs.closure$compile_sources.invoke(closure.clj:996)
	at cljs.closure$build.invokeStatic(closure.clj:2817)
	at cljs.closure$build.invoke(closure.clj:2718)
	at cljs.build.api$build.invokeStatic(api.clj:208)
	at cljs.build.api$build.invoke(api.clj:189)
	at cljs.build.api$build.invokeStatic(api.clj:195)
	at cljs.build.api$build.invoke(api.clj:189)
	at cljsbuild.compiler$compile_cljs$fn__718.invoke(compiler.clj:61)
	at cljsbuild.compiler$compile_cljs.invokeStatic(compiler.clj:60)
	at cljsbuild.compiler$compile_cljs.invoke(compiler.clj:48)
	at cljsbuild.compiler$run_compiler.invokeStatic(compiler.clj:168)
	at cljsbuild.compiler$run_compiler.invoke(compiler.clj:129)
	at user$eval847$iter__895__899$fn__900$fn__926.invoke(form-init3297578457875040857.clj:1)
	at user$eval847$iter__895__899$fn__900.invoke(form-init3297578457875040857.clj:1)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.RT.seq(RT.java:528)
	at clojure.core$seq__5124.invokeStatic(core.clj:137)
	at clojure.core$dorun.invokeStatic(core.clj:3125)
	at clojure.core$doall.invokeStatic(core.clj:3140)
	at clojure.core$doall.invoke(core.clj:3140)
	at user$eval847.invokeStatic(form-init3297578457875040857.clj:1)
	at user$eval847.invoke(form-init3297578457875040857.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7062)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.Compiler.loadFile(Compiler.java:7452)
	at clojure.main$load_script.invokeStatic(main.clj:278)
	at clojure.main$init_opt.invokeStatic(main.clj:280)
	at clojure.main$init_opt.invoke(main.clj:280)
	at clojure.main$initialize.invokeStatic(main.clj:311)
	at clojure.main$null_opt.invokeStatic(main.clj:345)
	at clojure.main$null_opt.invoke(main.clj:342)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: node_modules/web3/dist/web3.min.js (No such file or directory) at line 13 /home/hlolli/forks/status-react/src/status_im/utils/js_resources.cljs {:file "/home/hlolli/forks/status-react/src/status_im/utils/js_resources.cljs", :line 13, :column 16, :tag :cljs/analysis-error}
	at clojure.core$ex_info.invokeStatic(core.clj:4739)
	at clojure.core$ex_info.invoke(core.clj:4739)
	at cljs.analyzer$error.invokeStatic(analyzer.cljc:697)
	at cljs.analyzer$error.invoke(analyzer.cljc:693)
	at cljs.analyzer$macroexpand_1.invokeStatic(analyzer.cljc:3342)
	at cljs.analyzer$macroexpand_1.invoke(analyzer.cljc:3338)
	at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3375)
	at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3355)
	at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:3545)
	at cljs.analyzer$analyze_form.invoke(analyzer.cljc:3541)
	at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3595)
	at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3586)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3616)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:3598)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3607)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:3598)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3605)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:3598)
	at cljs.analyzer$analyze_js_star_STAR_$fn__2299.invoke(analyzer.cljc:3029)
	at clojure.core$map$fn__5587.invoke(core.clj:2747)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.Cons.next(Cons.java:39)
	at clojure.lang.PersistentVector.create(PersistentVector.java:73)
	at clojure.lang.LazilyPersistentVector.create(LazilyPersistentVector.java:44)
	at clojure.core$vec.invokeStatic(core.clj:377)
	at clojure.core$vec.invoke(core.clj:367)
	at cljs.analyzer$analyze_js_star_STAR_.invokeStatic(analyzer.cljc:3029)
	at cljs.analyzer$analyze_js_star_STAR_.invoke(analyzer.cljc:3027)
	at cljs.analyzer$analyze_js_star.invokeStatic(analyzer.cljc:3057)
	at cljs.analyzer$analyze_js_star.invoke(analyzer.cljc:3056)
	at cljs.analyzer$fn__2312.invokeStatic(analyzer.cljc:3064)
	at cljs.analyzer$fn__2312.invoke(analyzer.cljc:3059)
	at clojure.lang.MultiFn.invoke(MultiFn.java:251)
	at cljs.analyzer$analyze_seq_STAR_.invokeStatic(analyzer.cljc:3348)
	at cljs.analyzer$analyze_seq_STAR_.invoke(analyzer.cljc:3346)
	at cljs.analyzer$analyze_seq_STAR__wrap.invokeStatic(analyzer.cljc:3353)
	at cljs.analyzer$analyze_seq_STAR__wrap.invoke(analyzer.cljc:3351)
	at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3377)
	at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3355)
	at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:3545)
	at cljs.analyzer$analyze_form.invoke(analyzer.cljc:3541)
	at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3595)
	at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3586)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3616)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:3598)
	at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3378)
	at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3355)
	at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:3545)
	at cljs.analyzer$analyze_form.invoke(analyzer.cljc:3541)
	at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3595)
	at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3586)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3616)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:3598)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3607)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:3598)
	at cljs.analyzer$fn__1733$fn__1736.invoke(analyzer.cljc:1541)
	at cljs.analyzer$fn__1733.invokeStatic(analyzer.cljc:1539)
	at cljs.analyzer$fn__1733.invoke(analyzer.cljc:1473)
	at clojure.lang.MultiFn.invoke(MultiFn.java:251)
	at cljs.analyzer$analyze_seq_STAR_.invokeStatic(analyzer.cljc:3348)
	at cljs.analyzer$analyze_seq_STAR_.invoke(analyzer.cljc:3346)
	at cljs.analyzer$analyze_seq_STAR__wrap.invokeStatic(analyzer.cljc:3353)
	at cljs.analyzer$analyze_seq_STAR__wrap.invoke(analyzer.cljc:3351)
	at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3377)
	at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3355)
	at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:3545)
	at cljs.analyzer$analyze_form.invoke(analyzer.cljc:3541)
	at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:3595)
	at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:3586)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:3616)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:3598)
	at cljs.compiler$emit_source.invokeStatic(compiler.cljc:1386)
	at cljs.compiler$emit_source.invoke(compiler.cljc:1365)
	at cljs.compiler$compile_file_STAR_$fn__3672.invoke(compiler.cljc:1467)
	at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1285)
	at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1274)
	at cljs.compiler$compile_file_STAR_.invokeStatic(compiler.cljc:1451)
	at cljs.compiler$compile_file_STAR_.invoke(compiler.cljc:1444)
	at cljs.compiler$compile_file$fn__3702.invoke(compiler.cljc:1547)
	... 58 more
Caused by: java.io.FileNotFoundException: node_modules/web3/dist/web3.min.js (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at clojure.java.io$fn__10968.invokeStatic(io.clj:229)
	at clojure.java.io$fn__10968.invoke(io.clj:229)
	at clojure.java.io$fn__10881$G__10874__10888.invoke(io.clj:69)
	at clojure.java.io$fn__10980.invokeStatic(io.clj:258)
	at clojure.java.io$fn__10980.invoke(io.clj:254)
	at clojure.java.io$fn__10881$G__10874__10888.invoke(io.clj:69)
	at clojure.java.io$fn__10942.invokeStatic(io.clj:165)
	at clojure.java.io$fn__10942.invoke(io.clj:165)
	at clojure.java.io$fn__10894$G__10870__10901.invoke(io.clj:69)
	at clojure.java.io$reader.invokeStatic(io.clj:102)
	at clojure.java.io$reader.doInvoke(io.clj:86)
	at clojure.lang.RestFn.invoke(RestFn.java:410)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$slurp.invokeStatic(core.clj:6862)
	at clojure.core$slurp.doInvoke(core.clj:6862)
	at clojure.lang.RestFn.invoke(RestFn.java:410)
	at status_im.utils.slurp$slurp.invokeStatic(slurp.clj:6)
	at status_im.utils.slurp$slurp.invoke(slurp.clj:5)
	at clojure.lang.AFn.applyToHelper(AFn.java:160)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:661)
	at clojure.core$apply.invoke(core.clj:652)
	at cljs.analyzer$macroexpand_1_STAR_$fn__2369.invoke(analyzer.cljc:3295)
	at cljs.analyzer$macroexpand_1_STAR_.invokeStatic(analyzer.cljc:3294)
	at cljs.analyzer$macroexpand_1_STAR_.invoke(analyzer.cljc:3281)
	... 134 more
Error encountered performing task 'cljsbuild' with profile(s): 'prod'
Subprocess failed
make[1]: *** [Makefile:95: prod-build-android] Error 1
make[1]: Leaving directory '/home/hlolli/forks/status-react'
make: *** [Makefile:67: release-android] Error 2

Givan that nix-patch-realm is the same on my fork and on status-im (I'm checked out on my fork)

@hlolli

This comment has been minimized.

Copy link
Contributor Author

commented May 22, 2019

Btw, maybe you want to have a look at my clj2nix library which I used here for lumo https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/clojurescript/lumo/deps.nix there's a function that generates a classpath, which can be passed to leiningen, tough I'd recomment tools.deps.alpha.

@PombeirP

This comment has been minimized.

Copy link
Member

commented May 22, 2019

Ah no, it was the lack of --bypass-cache in mobile. I'll push that, maybe you can reset and force push again? Sorry about that.

Thanks for the awesome help!

@PombeirP

This comment has been minimized.

Copy link
Member

commented May 22, 2019

Btw, maybe you want to have a look at my clj2nix library which I used here for lumo https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/clojurescript/lumo/deps.nix there's a function that generates a classpath, which can be passed to leiningen, tough I'd recomment tools.deps.alpha.

Yeah, that's one of the next steps after I bring yarn2nix to the project.

@PombeirP PombeirP moved this from CONTRIBUTOR to REVIEW in Pipeline for QA May 22, 2019

@PombeirP

This comment has been minimized.

Copy link
Member

commented May 22, 2019

@hlolli I pushed some more changes (added comments, fixed node version string in .TOOLVERSIONS).

@hlolli hlolli force-pushed the hlolli:nix-patch-realm branch from e89c611 to 403b489 May 22, 2019

@hlolli

This comment has been minimized.

Copy link
Contributor Author

commented May 22, 2019

Cool, force pushed, I'll have to pass for testing for today, my hands are very full for the rest of the evening.

@vkjr

vkjr approved these changes May 23, 2019

@status-github-bot status-github-bot bot moved this from REVIEW to E2E Tests in Pipeline for QA May 23, 2019

@PombeirP

This comment has been minimized.

Copy link
Member

commented May 23, 2019

@hlolli Come to think about it, I believe that ubuntu-server.js is only used in desktop configuration, so we could leave the mobile part out of this for the time being (it'll be useful soon for #8203 though). Maybe we can leave the folder in there but just not bring it in to the mobile configuration.

@statustestbot

This comment has been minimized.

Copy link

commented May 23, 2019

98% of end-end tests have passed

Total executed tests: 49
Failed tests: 1
Passed tests: 48

Failed tests (1)

Click to expand
1. test_deploy_contract_from_daap

Device 1: Tap on GotItButton
Device 1: Looking for an element by text: 'Contract deployed at: '

Contract was not created

Device sessions

Passed tests (48)

Click to expand
1. test_block_user_from_public_chat
Device sessions

2. test_filters_from_daap
Device sessions

3. test_copy_and_paste_messages
Device sessions

4. test_send_transaction_from_daap
Device sessions

5. test_request_and_receive_tokens_in_1_1_chat
Device sessions

6. test_open_transaction_on_etherscan
Device sessions

7. test_public_chat_messaging
Device sessions

8. test_long_press_to_delete_1_1_chat
Device sessions

9. test_password_in_logcat_sign_in
Device sessions

10. test_text_message_1_1_chat
Device sessions

11. test_add_to_contacts
Device sessions

12. test_sign_typed_message (TestRail link is not found)
Device sessions

13. test_unread_messages_counter_1_1_chat
Device sessions

14. test_logcat_send_transaction_from_daap
Device sessions

15. test_send_message_in_group_chat
Device sessions

16. test_logcat_send_transaction_from_wallet
Device sessions

17. test_send_token_with_7_decimals
Device sessions

18. test_modify_transaction_fee_values
Device sessions

19. test_send_eth_from_wallet_to_address
Device sessions

20. test_manage_assets
Device sessions

21. test_logcat_send_transaction_in_1_1_chat
Device sessions

22. test_request_and_receive_eth_in_1_1_chat
Device sessions

23. test_long_press_to_delete_public_chat
Device sessions

24. test_send_emoji
Device sessions

25. test_search_chat_on_home
Device sessions

26. test_logcat_recovering_account
Device sessions

27. test_messaging_in_different_networks
Device sessions

28. test_send_tokens_in_1_1_chat
Device sessions

29. test_network_mismatch_for_send_request_commands
Device sessions

30. test_logcat_sign_message_from_daap
Device sessions

31. test_switch_users_and_add_new_account
Device sessions

32. test_send_stt_from_wallet
Device sessions

33. test_send_eth_in_1_1_chat
Device sessions

34. test_login_with_new_account
Device sessions

35. test_send_eth_from_wallet_to_contact
Device sessions

36. test_add_contact_from_public_chat
Device sessions

37. test_send_two_transactions_one_after_another_in_dapp
Device sessions

38. test_password_in_logcat_creating_account
Device sessions

39. test_backup_recovery_phrase
Device sessions

40. test_offline_status
Device sessions

41. test_open_google_com_via_open_dapp
Device sessions

42. test_unread_messages_counter_public_chat
Device sessions

43. test_sign_message_from_daap
Device sessions

44. test_user_can_remove_profile_picture
Device sessions

45. test_share_contact_code_and_wallet_address
Device sessions

46. test_request_eth_in_wallet
Device sessions

47. test_refresh_button_browsing_app_webview
Device sessions

48. test_backup_recovery_phrase_warning_from_wallet
Device sessions

hlolli and others added some commits Apr 1, 2019

[nix] patch realm as a nodePackage for linux and darwin and use it fr…
…om nix store, add to default nix-shell buildDependencies, regenerate nodePackages with node2nix 1.6.1
nix: Move debug realm into desktop folder and use RN cli from node_mo…
…dulesSigned-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>

@PombeirP PombeirP force-pushed the hlolli:nix-patch-realm branch from 403b489 to ee12772 May 23, 2019

@PombeirP PombeirP merged commit ee12772 into status-im:develop May 23, 2019

9 checks passed

GPG All commits have a verified GPG signature
WIP Ready for review
Details
security/snyk - android/app/build.gradle (Status-im) No manifest changes detected
security/snyk - android/build.gradle (Status-im) No manifest changes detected
security/snyk - fastlane/Gemfile.lock (Status-im) No manifest changes detected
security/snyk - modules/react-native-desktop-linking/package.json (Status-im) No manifest changes detected
security/snyk - modules/react-native-desktop-notification/package.json (Status-im) No manifest changes detected
security/snyk - modules/react-native-status/package.json (Status-im) No manifest changes detected
security/snyk - test/appium/requirements.txt (Status-im) No manifest changes detected

Pipeline for QA automation moved this from E2E Tests to DONE May 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
7 participants
You can’t perform that action at this time.