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

Help with contributor getting started on Lombok #1659

Closed
rdsubhas opened this issue Apr 16, 2018 · 3 comments
Closed

Help with contributor getting started on Lombok #1659

rdsubhas opened this issue Apr 16, 2018 · 3 comments

Comments

@rdsubhas
Copy link

Hi, firstly, thank you so much for making Java development bearable. I would like to contribute to lombok (looking at #1207), and my first target is to checkout and get tests passing. So I checkout and do the following:

  • ant -projecthelp
  • ant setupJavaOracle8TestEnvironment - throws lots of errors:
    • on src/core9
    • build.xml <ivy:compile destdir="build/lombok" source="1.9" target="1.9"> runs even though I'm only running setupJavaOracle8TestEnvironment
  • battle for some time and then proceed to install JDK9 in laptop (macbook 2016)
  • after installing JDK9, ant setupJavaOracle8TestEnvironment works
  • and then run ant dist, lots of tests fail
  • and then for sometime I try to setup in the IDE

After spending a weekend on setting up a development environment on Lombok, my apologies, I gave up. Either I'm doing something very wrong, in which case I'd like to get some help from you folks on what's going wrong here. Or I'd like to start contributing on setting up an easy test environment (update buildscripts or docs) and a CI (Travis CI?) running the tests on every PR. What do you think? :)

@rdsubhas rdsubhas changed the title Help with contributor quickstart on Lombok Help with contributor getting started on Lombok Apr 16, 2018
@rzwitserloot
Copy link
Collaborator

JDK 9 requirement

We should be a bit more clear, but JDK9 is required to build lombok (Why? Well, it's, short of resorting to things like ecj, not possible to produce a lombok.jar that runs on JDK9 without compiling it on JDK9).

SOLUTION: Make ant detect that you're on 8 or less and error out immediately.

ant setupJavaOracle8TestEnvironment

I've pulled a fresh clone of the repo, set my mac environment to use javac8, and ran this. No errors.

I guess you're doing something wrong? I have no idea; please provide the errors you got, there's not much I can do without this information.

Separately, you didn't need to do that; just ant eclipse or ant dist, depending on what you're trying to do, is fine.

lots of tests fail

Well, master branch is the live dev branch. Revert to a tagged release if you want something stable. Most of the failing tests are indicative of lombok doing something wrong in rather exotic situations, and the tests reflect this, but these aren't, generally, 'hair on fire!!!' must fix overnighters or anything. The vast majority of lombok users won't run into it. Don't worry about it.

Setting up in the IDE

Well, works for me. As the saying goes, 'doesn't work' is not a great bug report. Some detail is required or I can't help you. I think your priorities are a bit messed up. You want to contribute and the first focus is by questioning our choices of buildscripts? It's a complex mess for a very good reason: Lombok is just about the most complicated project you can possibly build. It's really not a good place to start contributing.

This is a grab-bag: You've listed lots of separate feature requests and bug reports with very little detail. For next time:

  • File bug reports as good, well documented reports: Include relevant data such as java versions, your OS, and what setup you did do, and which errors you get, and only submit one problem per item.

  • Discuss ideas for contributing, or general complaints about how easy or hard it is to 'get started', so to speak, on the forum. Lombok dev is less easy to get into than we'd like, but a large part of that is just inherent in the complexity of what lombok is trying to do.

@victorwss
Copy link
Contributor

victorwss commented Apr 16, 2018

I'm using Windows. I tested if I was able to do a fresh build of lombok with this:

  1. git clone https://github.com/rzwitserloot/lombok.git

  2. Set proxy properties if needed (that is the case for me):

    set ANT_OPTS=-Dhttp.proxyHost=myproxyhost -Dhttp.proxyPort=3128 -Dhttp.proxyUser=myproxyusername -Dhttp.proxyPassword=myproxypassword -Dhttps.proxyHost=myproxyhost -Dhttps.proxyPort=3128
    

    Naturally, if you are behind a proxy, you'll need to configure the host, port and user accordingly to your configuration. If you are not behind a proxy, you might just skip this step.

  3. java -version:

    This outputs:

    java version "10" 2018-03-20
    Java(TM) SE Runtime Environment 18.3 (build 10+46)
    Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode)
    
  4. javac -version:

    This outputs just javac 10

  5. ant - Yes, just ant and nothing more. This takes some time to download a bunch of dependencies and a few time compiling stuff. But ends pristine in the end, after 7 minutes and 7 seconds there is lombok.jar and lombok-1.16.21.jar in my dist folder.

Of course, as @rzwitserloot said, getting things from master instead of a tagged branch will likely also grab some not well-tested things with that. But hey, if you have the JARs in the dist folder, this means that you just compiled it. So, you can start to hack its code to work out your features and bugfixes.

@rdsubhas
Copy link
Author

rdsubhas commented Apr 16, 2018

@rzwitserloot I should be really clear that I did not mean to "rant", in fact quite the opposite. My priority was pretty simple: checkout and run tests, from the CLI, following the docs printed by ant -projecthelp. I must say that cramming in stuff like questioning our choice of buildscript (?) is disheartening to read.

@victorwss thanks, I'll try a tagged release. I didn't know that it was OK for tests to fail on master, and spent a lot of time trying to get them pass. For a complex project like lombok, I wouldn't want to start out on a test failing scenario - because when I start changing code, there is no telling whether failing tests were breaking before or after, and leads to good old "It compiles on my machine" problems. Hence I'll still try to get tests passing on a tagged release and begin iterating from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants