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

Fix Electron linting errors #929

Merged
merged 14 commits into from
Jan 15, 2018
Merged

Fix Electron linting errors #929

merged 14 commits into from
Jan 15, 2018

Conversation

IGassmann
Copy link
Contributor

@IGassmann IGassmann commented Jan 8, 2018

This pull request fixes #397 and:

  • Adds brew update to build script for getting latest dependencies versions
  • Cleans .gitignore to remove IDE specific ignores and old rules.
  • Renames package-json name field to be compliant with npm and yarn rules, and adds productName to build
  • Replaces dependency keytar with keytar-prebuild until feat: prebuild binaries for electron and node atom/node-keytar#67 is not merged. This simplifies the build process on Windows. There's no need anymore for Python and Windows building tools.

@IGassmann IGassmann self-assigned this Jan 8, 2018
@IGassmann IGassmann added the type: improvement Existing (or partially existing) functionality needs to be changed label Jan 8, 2018
@IGassmann IGassmann requested a review from lyoshenka January 8, 2018 17:56
Copy link
Member

@lyoshenka lyoshenka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much of build.sh can we put into yarn build. I'd love to drop that script, or at least work towards dropping it.

@@ -42,6 +42,7 @@ if $LINUX; then
$INSTALL build-essential libssl-dev libffi-dev libgmp3-dev python2.7-dev libsecret-1-dev curl
elif $OSX && ! cmd_exists brew ; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this only gets run if brew command does not exist. so it will only update when it is installed. is that what you intended?

README.md Outdated

### One-time Setup

1. Clone this repo
2. `DEPS=true ./build.sh`
2. `./build.sh`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you get rid of DEPS=true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need anymore for installing dependencies from the build script. The user should install the prerequisites listed in README.md. That is Git, Node, and Yarn. No need anymore for Python for developing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be much better if users ran a script to install dependencies instead of following a README. that way if the dependencies change, no one has to remember to update the README

/src/main/locales
/src/main/node_modules
/src/renderer/dist
/build/venv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe build/venv is still used (by build.sh)

.gitignore Outdated
/daemon/build
/daemon/venv
/daemon/requirements.txt
/.idea
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is here because many of us use JetBrains, which creates that dir

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to keep project related ignore rules into the project .gitignoreand user-specific rules into the user's global .gitignore.

/daemon/requirements.txt
/.idea

*.pyc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has to be here while upload_assets.py is still in use. if you want to rewrite that in JS instead, then we can drop python dependency completely, which would be sweet!

@IGassmann
Copy link
Contributor Author

build.sh is currently only necessary for downloading and extracting the daemon. I'm planning to try to get the daemon as a package.json dependency. It should be done with node-pre-gyp as far as I know.

@lyoshenka lyoshenka self-requested a review January 10, 2018 15:10
@lbry-bot lbry-bot assigned lyoshenka and unassigned IGassmann Jan 10, 2018
@lyoshenka
Copy link
Member

is the app no longer built/released by teamcity? teamcity runs build.sh

@lbry-bot lbry-bot assigned lyoshenka and IGassmann and unassigned lyoshenka Jan 10, 2018
Copy link
Member

@lyoshenka lyoshenka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i hope you tested this on all 3 oses, and made sure it still works with teamcity. if so, lgtm

package.json Outdated
@@ -1,5 +1,5 @@
{
"name": "LBRY",
"name": "lbry-app",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did this change? will this affect the .deb package that's built? if the name changes, i think ubuntu will think its a different package...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the name to follow the norms. I'm not sure how exactly it'll behave in Ubuntu since I didn't test on it, but it should normally use the productName field declared in the electron-builder.json file and not the package.json's name.

I'll test it to be sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debian does identify the app as a new package and doesn't replace the one with the previous name.

I think we should wait for the AppImage switch, which should come with the auto-update PR, before applying this change and then request Linux users that they uninstall their previous install.

@lbry-bot lbry-bot assigned IGassmann and unassigned IGassmann Jan 10, 2018
@lbry-bot lbry-bot assigned IGassmann and unassigned IGassmann Jan 15, 2018
@IGassmann IGassmann requested a review from lyoshenka January 15, 2018 15:42
@lbry-bot lbry-bot assigned lyoshenka and unassigned IGassmann Jan 15, 2018
Copy link
Member

@lyoshenka lyoshenka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure you change the app name back to lbry. otherwise lgtm.

@lbry-bot lbry-bot assigned IGassmann and unassigned lyoshenka Jan 15, 2018
@IGassmann IGassmann merged commit 3c1d471 into master Jan 15, 2018
@IGassmann IGassmann deleted the issue/397 branch February 27, 2018 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement Existing (or partially existing) functionality needs to be changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix linting errors
2 participants