abertschi / graalphp

An efficient PHP implementation built on GraalVM
https://abertschi.ch/blog/2020/building-graalphp/
Apache License 2.0
289 stars 13 forks source link

[Help] Compile and run #70

Open evnix opened 4 years ago

evnix commented 4 years ago

mvn package works beautifully but we can't be doing it over and over again, as it is very slow.

My knowledge on mvn is limited as I mostly use gradle, is there some mvn equivalent to mvn run GraalPhpMain /path/file.php so that we can iterate faster.

and probably how to run the tests as well

would be nice to have this added to the Readme

@abertschi

abertschi commented 4 years ago

It is known that Gradle typically outperforms Maven in benchmarks [0]. Tooling is very subjective. We currently do not intent to replace Maven with Gradle and rather invest efforts into language features (see [1]). At some point Maven will be replaced with mx to build Graal from source. But so far we have not needed this feature.

You may want to explore optimization techniques presented here: [2] (and others). And ideally share your results such that we can adapt it and perhaps document it for others.

With mvn package -DskipTests=true you can skip unit and end2end test. If you use an IDE, you may want to explore build and run features of the IDE. For instance, for new features I typically start with a unit test and implement features based on tests [3]. Intellij supports build and run for unit tests within the IDE.

[0] https://gradle.org/gradle-vs-maven-performance/ [1] https://github.com/abertschi/graalphp/issues/57#issuecomment-699504478 [2] https://www.jrebel.com/blog/how-to-speed-up-your-maven-build [3] https://en.m.wikipedia.org/wiki/Test-driven_development

solidpulse commented 4 years ago

@abertschi

This command is really useful

mvn package -DskipTests=true

can you list a few others that you commonly use, this will be a good starting point for us, To give you an idea, This is how I struggle with running tests, It has been over 4 to 5 days and I am struggling to do even the basic things,

https://imgur.com/a/Jhnx4an

Any screenshots(or screen captures) on how to run those individual tests would be a god send(run configuration on IntelliJ)

Screenshot 2020-10-07 at 20 03 35

basically,

  1. list us your most used commands
  2. screenshots would be really nice