Page MenuHomePhabricator

Having trouble setting up MobileFrontend for development
Open, LowPublic2 Estimated Story Points

Description

I enabled the vagrant role, and then did:

Each time I got a little further, but now it seems to get complicated so I'm wondering if I'm doing something wrong or missing some docs somewhere. I tried to find them here and didn't, so I started adding some basic info:

https://www.mediawiki.org/w/index.php?title=Extension%3AMobileFrontend&type=revision&diff=3282042&oldid=3227616

Any guidance is appreciated, I'm just trying to submit a small patch to update use of deprecated schema Resource Loader modules. This work is related to T221281

Event Timeline

@Milimetric could you explain whats wrong? are you getting any errors?

yes, this is the output when I try to git commit after fixing the things I mentioned. I decided not to go forward and try to install parallel-lint manually because the composer.json file in the repository seems to have it as a dependency:

https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/composer.json#L3

And it seemed to me it should just work, meaning I must've done something else wrong. But mostly I was just wondering if there are docs for getting started and submitting a patch for this repository.

resources/dist/mobile.editor.overlay.js
resources/dist/mobile.editor.overlay.js.map.json
resources/dist/mobile.editor.ve.js
resources/dist/mobile.editor.ve.js.map.json
There are changes to resources/dist.

I will now check that you built them using the correct Node.js version v10.15.2.
Note: You are using v10.15.2.
Building assets...
Built at: 06/20/2019 11:25:12 AM
 PASS  resources/dist/mobile.startup.runtime.js: 760B < maxSize 819B (gzip) 

 PASS  resources/dist/mobile.common.js: 16.08KB < maxSize 16.1KB (gzip) 

 PASS  resources/dist/mobile.editor.overlay.js: 6.14KB < maxSize 8KB (gzip) 

 PASS  resources/dist/mobile.editor.ve.js: 614B < maxSize 2KB (gzip) 

 PASS  resources/dist/mobile.init.js: 4.34KB < maxSize 4.4KB (gzip) 

 PASS  resources/dist/mobile.startup.js: 5.72KB < maxSize 5.8KB (gzip) 

 PASS  resources/dist/mobile.languages.structured.js: 1.8KB < maxSize 1.9KB (gzip) 

 PASS  resources/dist/mobile.notifications.overlay.js: 1015B < maxSize 1.5KB (gzip) 

 PASS  resources/dist/mobile.mediaViewer.js: 2.43KB < maxSize 2.5KB (gzip) 

 PASS  resources/dist/mobile.special.mobilediff.scripts.js: 750B < maxSize 819B (gzip) 

 PASS  resources/dist/mobile.special.mobileoptions.scripts.js: 956B < maxSize 1KB (gzip) 

 PASS  resources/dist/mobile.special.userlogin.scripts.js: 219B < maxSize 307B (gzip) 

 PASS  resources/dist/mobile.special.uploads.scripts.js: 1.71KB < maxSize 1.8KB (gzip) 

 PASS  resources/dist/mobile.special.watchlist.scripts.js: 1.28KB < maxSize 1.3KB (gzip) 

 PASS  resources/dist/mobile.talk.overlays.js: 2.84KB < maxSize 2.9KB (gzip) 

 PASS  resources/dist/mobile.categories.overlays.js: 2.62KB < maxSize 2.7KB (gzip) 

Your changes look good!
> parallel-lint . --exclude vendor --exclude node_modules
sh: 1: parallel-lint: not found
Script parallel-lint . --exclude vendor --exclude node_modules handling the test event returned with error code 127
pre-commit: 
pre-commit: We've failed to pass the specified git pre-commit hooks as the `precommit`
pre-commit: hook returned an exit code (1). If you're feeling adventurous you can
pre-commit: skip the git pre-commit hooks by adding the following flags to your commit:
pre-commit: 
pre-commit:   git commit -n (or --no-verify)
pre-commit: 
pre-commit: This is ill-advised since the commit is broken.
pre-commit:

@Milimetric thanks for the log. Looks like parallel-lint is missing. Usually I work from vagrant environment, and vagrant has all required dependencies installed.
I'll analyze whats wrong.

ovasileva added a project: Readers-Web-Backlog.
ovasileva moved this task from Incoming to Upcoming on the Readers-Web-Backlog board.
ovasileva set the point value for this task to 2.Jun 25 2019, 4:11 PM

This was on a relatively new vagrant I set up like a month or two ago, and I just enabled the mobilefrontend role, vagrant provision, and from there I had these troubles.

By the way, in the meantime it looks like Bartosz submitted the patch I was trying to submit, so this is not at all urgent anymore. If it normally works in Vagrant, then maybe I just did something crazy, feel free to disregard.

@Milimetric thanks for the note. It could be something wrong with the env, but we noticed that MediaWiki MobileFrontend/Minerva documentation is out of date. We will use this ticket to verify that everything works as expected, and we will update documents to match current development flow (for example there is no mention of the build step).

We should aim for easy development, people without experience should be able to get vagrant, enable role and start working on our projects without hassle. If someone had problems, it's pretty good indicator that we could do better.

Jdlrobson lowered the priority of this task from High to Low.Jul 15 2019, 8:39 PM

I tried to enable the vagrant role again to test and I got this error, so I figure either my vagrant is messed up or this will prevent me from having a clean test. I think if it works for other folks on a clean vagrant, it's fine, I'll try to test again when I look at the unit testing RFC next.

==> default: Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install firefox-esr' returned 100: Reading package lists...

Hey @Milimetric - just wondering if you are still hitting this. I'd happily spend some time with you next week trying to troubleshoot this together if it is.

@Jdlrobson ping me and we can do it, I haven't tried again, it'll be a surprise for everyone. If it works you can give me a task from your backlog and I'll get it done :)