-
Notifications
You must be signed in to change notification settings - Fork 115
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
Unify build systems #233
Comments
+1 to have fewer build systems. I'm not familiar with the gradle.properties though - is there a gradle build in luceneutil also? |
I made it mainly to make Intellij able to link the code and provide code
suggestions, but it does have potential to replace some of the build
…On Thu, Oct 12, 2023, 09:13 Michael Sokolov ***@***.***> wrote:
+1 to have fewer build systems. I'm not familiar with the
gradle.properties though - is there a gradle build in luceneutil also?
—
Reply to this email directly, view it on GitHub
<#233 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEFSB7GAEAHIXNE2CVRXEDLX7AJJDANCNFSM6AAAAAA52LWFDQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I love the idea of a unified build system, but in my experience it remains an unachievable ideal -- I wind up hating nearly every build system I use ;) It's sort of like modern day "security" -- a necessarily evil that barely stops bad actors and slows down legitimate users (there are exceptions, e.g. Tesla cars' security is almost great). Build systems become a barrier to progress making it hard to do simple things. Here is an example from Lucene's switch to Gradle, where merely detecting that you likely had a typo in the one test case you tried to run from the command line and so no tests ran and failing, required god-like mountain moving development to enable. Gradle in particular is also picky about specific JVM versions, which is not great since we use This proejct has some tricky dev requirements for a build tool. It's not just building the local java source in When one wants to make improvements to these benchmarks, one must also become knowledgeable in whatever build system we pick, raising the (already high!) required bar for contributions. These are the reasons why we still have a crappy "Mike build" here -- it's entirely Python (the language for expressing the test case already) so already approachable by Pythonistas. I would expect dev effort against Is there a nice Python based build system yet :) All this being said, I would be happy to try yet another build system, as long as it does not become too much of a barrier to actual progress in benchmarking. It should be nearly invisible to devs, like a Tesla car's security.
|
Amazingly, I was also struglling with same issues in the build and was about to open an issue today for the same when I checked this issue already open last week. And so I have following proposal. I will submit a PR for the same.
|
Another 2 interesting aspects of Gradle are
So it became a one liner change ( Ant to Gradle
|
Personally I don't care all that much what the build system is. I do like to keep things as simple as possible, so I kind of like declarative build configuration rather than a build controlled by a programming language. Still missing Makefiles I guess. But mostly I would just like whatever system we have to be maintained and easy to use. Easy to update is a second priority, but also important. For this change I suggest testing it by running the nightlyBenchmarks.py - I think the move of classes to a legacy folder might break some of that? |
I agree the that build system should not come in the way of development. The problem is the current system is definitely taking more time and effort for building so any automated system seems better than current.
I think the learning curve in Gradle is definitely higher than than any of the other build system and it seems to be evoling fast, which again means we should expect frequent additions and changes to it. The languages used namely kotlin and grovvy are both something that we don't use in day to day development, so that is another hinderance for someone new to make any custom change with. In the absence of any definitive winner, as per my understanding, and in need of some good build system, I will give Apache Ant + Ivy a shot and get some build system to work in the project which works fine with IDEs as well. Ant surely does not come in between anything else, so may be having a python build system along side Ant is more feasible as compared to Maven and Gradle. |
@mikemccand @msokolov @zhaih : I tested that following commands and they worked fine. for java:
for python:
I was not able to find the I tried running Let me know if you like this build system and what else should I test. |
I have created a new PR with Ant + Ivy build. Please have a look. #247 I am still not sure how to test the nightly benchmarks. Please help me with the right command to verify this. Rest everything seems to be working fine. |
Thank you Nitiraj! I'll try to take a look soon
…On Sun, Dec 3, 2023 at 11:59 PM nitirajrathore ***@***.***> wrote:
I have created a new PR with Ant + Ivy build. Please have a look. #247
<#247>
I am still not sure how to test the nightly benchmarks. Please help me
with the right command to verify this. Rest everything seems to be working
fine.
Please review.
—
Reply to this email directly, view it on GitHub
<#233 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEFSB7DP7XSMKYDLHWBE66TYHV7EZAVCNFSM6AAAAAA52LWFDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZYGAYTKOJWGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
To @mikemccand 's comment
I think when we build the source we always expect to use the Lucene's JDK version, when we run it, we can use different jvms right? For
I think that's why it's really important we only have 1 place to specify a lucene checkout instead of 3 (which is current situation)
I agree, and I think that's why we need to do this, we need to work harder on those build system such that it is not visible for the newcomers (just like Lucene, there's tons of gradle scripts we run daily but we never notice them). Ideally all one should ever do is to invoke To summarize, I think we should have one and only one build system that does:
As for how we run the jar, we can still let python do that, or figure out a better way in the future. |
Don't think so. Does not hurt to run Ant can efficiently compile and do a lot of setup task. Python can be used to run the python runnables which will use the compiled class located in the designated folder in java's class path whereever required. More importantly I think we should conclude on one strategy and make progress. If things do not work very well we can try other options. |
I guess I don't really care whether we use gradle, ant, python, make,
maven, or some other build system that has not yet been invented. The main
thing I would like is some place I can see what the available build targets
are, what they do, and how they relate to each other. I think that's easier
if we have fewer systems. It seems unlikely we will remove the Python build
system - I guess initially I thought we would be able to do that. But since
we aren't even trying to do so, I wonder if we should just double down and
improve it?
On the other hand, the Python build code is pretty idiosyncratic. Not sure
we want to add to it? As far as whether young-uns grok Ant I'm not sure it
matters? They have a lot to learn; we shouldn't make decisions based on the
ignorance of young people.
I have to admit I didn't really understand the IDE comments since I've
never tried using an IDE to develop this package. What benefit does the
build system provide the IDE?
…On Mon, Dec 11, 2023 at 1:18 AM nitirajrathore ***@***.***> wrote:
Ideally all one should ever do is to invoke setup.py and that's it.
Don't think so. Does not hurt to run ant compile before any python run.
Ant can efficiently compile and do a lot of setup task. Python can be used
to run the python runnables which will use the compiled class located in
the designated folder in java's class path whereever required.
Going forward I am planning to submit quite some java main classes which
can execute a lot of tasks independent of python. We should not impose
python build on those java main classes.
More importantly I think we should conclude on one strategy and make
progress. If things do not work very well we can try other options.
—
Reply to this email directly, view it on GitHub
<#233 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHHUQPUJTD5BSKAG4FZGGTYI2QSRAVCNFSM6AAAAAA52LWFDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGM4TGMJVGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I think there are couple of things when talk about build system.
1, 2 and 3 are done by Ant very well. (4) is not handled currently automatically. But should be relatively easy to use a requirements.txt file inside the python package and we can run (5) I would say that invoking python scripts should still be done by I definitely do not like java files being compiled inside the python script using javac command. If that is what we are calling python build system, I am surely in favor of removing it. I did not remove it in this PR just to avoid any breaking changes. Please feel free approve PR if that looks good or propose changes. I would be happy to incorporate any change in the PR asap. Configuring IDE is marked optional. I included that section as the earlier gradle build was introduced to make the IDE compilation happy. So just wanted to make sure that people who uses IDE can still continue to use it with Ant as well. |
Right now in normal luceneutil run (using local_run.py) we're using "Mike build" where each file is hardcoded and linked with your local lucene checkout.
And when we run knn_perf_test.py we have the local variable to specify the lucene checkout and we use ant build to build the vector files as well as KnnGraphTester.java
Plus we have to specify lucene checkout in
build.xml
(for ant build), and ingradle.properties
(for code hint in Intellij), there's just too many different build system and too many places to specify your lucene checkout.Maybe it's time to unify to one build system and centralize a place for configs?
The text was updated successfully, but these errors were encountered: