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

Suggestion: Migrate to newer technologies #614

Open
vibhorgupta-gh opened this issue Nov 3, 2018 · 6 comments
Open

Suggestion: Migrate to newer technologies #614

vibhorgupta-gh opened this issue Nov 3, 2018 · 6 comments
Labels
GoogleSummerOfCode suggestions needed Thread have a on-going discussion on this issue

Comments

@vibhorgupta-gh
Copy link

vibhorgupta-gh commented Nov 3, 2018

Expected Behavior

Smooth installation process without any dependency hassle. Setting up the project should require minimal steps.

Current Behavior

While setting up Bassa recently on my machine, I came across a couple of serious issues.

  • First and foremost, the README.md is missing the command pip3 install -r requirements.txt. For someone new to python, this might be a problem.

  • mysqlclient is a problematic package, with reduced support each passing day. Installing the 1.3.7 version required for Bassa leads to the following error:

screen shot 2018-11-03 at 11 48 59 am

This is a missing header file in the mysqlclient-c dependency of the library. After looking through a bunch of resources, I tried the following -

  1. Installing mysqlclient=1.3.12
  2. Referring to this link and running
env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip3 install mysqlclient==1.3.12

Both of these result in no luck, with installation ending with a fail in building the mysqlclient wheel:

screen shot 2018-11-03 at 4 40 51 pm

The package works fine though, with the database being set up without any problems and the data being fetched and save properly. The problem lies in the fact that there is limited support now, and I imagine even less in the future.

  • bower has become really old and obsolete now. NPM itself warns us

screen shot 2018-11-03 at 4 47 42 pm

  • gulp behaves unexpectedly. Installing without sudo just doesn't work at all. And installing with sudo but without homebrew doesn't work either. I tried multiple times, read multiple stack overflow solutions, nothing. sudo gulp serve WILL NOT work if installed via NPM. gulp serve wont work either way. Same goes for bower. They will ONLY work if:
brew install gulp -g
brew install bower -g
  • See how gulp just wont work. It has become rebellious :

screen shot 2018-11-03 at 4 48 48 pm

Also, gulp commands refuse to work on my environment as it is. I have to add an npm script in package.json, "start": "gulp serve" to make it work. No idea why. Sometimes, it does work with gulp serve though.
gulp-sass does wonders sometimes too. Even though present and installed, it ocassionally says 'cannot find module gulp-sass'. Which then has to be rectified by running npm update or sometimes by reinstalling dependencies.

  • node-sass poses issues as well. Certain versions of it (I think below 3.9.0) are not compatible fully. Although Bassa doesn't use that version, still you cn find errors where it refuses to build and hence breaks the gulp tasks. sudo npm rebuild nose-sass has to be run to fix the problem, though not to full guarentee. The project can probably do away with it.

screen shot 2018-11-03 at 7 26 03 pm

Here is an article directly from their maintainer about 2 years ago, acknowledging breaks.

Possible Solution

I can only see long-term solutions to this. Moving the database to postgres and the frontend to a more potent library like angular4 or in my opinion, react. Reason being, the create-react-app comes bundled with webpack by default, and hence its beautiful. Minifying happens automatically and we don't have to worry about the JS or CSS compiling. The database being shifted to postgres is mainly because of extensive support and regular maintainance. It is frequently used as an SQL database, and hence has plenty support.
Also, consider migrating to yarn. It is way better than the newer npm versions. node-gyp is a pain in the ass most of the time.

Steps to Reproduce (for bugs)

Not sure if it's just me, but try to set up the project from scratch on the exact environment as listed below. Follow the Wiki for macOS installation.

Environment

  • Environment name and version (e.g. Chrome 39, node.js 5.4): Node version ~8.12.0
  • Operating System and version (desktop or mobile): MacBook Air, OSX 10.13.6
@vibhorgupta-gh
Copy link
Author

vibhorgupta-gh commented Nov 3, 2018

Unable to start the project altogether now. Was not facing this issue earlier.

screen shot 2018-11-03 at 7 05 39 pm

Related issues:

gulpjs/gulp#2162
nodejs/node#19786
gulpjs/gulp#2146

Seems to be a problem with the gulp version.

UPDATE

This issue will hit you if you use Node.js version ^10

@vivonk
Copy link
Collaborator

vivonk commented Nov 6, 2018

@VibhorCodecianGupta - @agentmilindu was thinking to shift from bower and gulp to webpack so that will reduce this error.
I have also faced a lot of errors with node sass so workaround can replace it will something else.
I haven't faced any problem with MySQLdb and libmysqlclient till the date but I guess it' making problem on Macbooks.
We can have a good discussion about upgrading our techs.

@vibhorgupta-gh
Copy link
Author

@vivonk absolutely. React with webpack and babel plugins is the brightest future for Bassa in my opinion.

@vivonk
Copy link
Collaborator

vivonk commented Nov 6, 2018

@VibhorCodecianGupta I guess shifting from angularjs to React might not be a right decision at this stage. Alternatively, we can have a branch where we can work on this.
@agentmilindu @rehrumesh can provide better insights into this 😄

@vibhorgupta-gh
Copy link
Author

Yes, sure. It can be initiated as a different release altogether, in a separate branch. If it's convincing enough to replace the current architecture, only then it could be considered to go ahead. On the other hand, we could also discuss migrating to Angular2/Angular4 instead of React.

@vivonk vivonk added the suggestions needed Thread have a on-going discussion on this issue label Jan 11, 2019
@lakinduakash
Copy link
Contributor

@vivonk Do we have a new branch for migrating?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoogleSummerOfCode suggestions needed Thread have a on-going discussion on this issue
Projects
None yet
Development

No branches or pull requests

3 participants