Skip to content

Eclipse file generation script#1

Merged
jart merged 1 commit into
google:masterfrom
wolfgangmeyers:bazel-eclipse-file-generation
Mar 9, 2016
Merged

Eclipse file generation script#1
jart merged 1 commit into
google:masterfrom
wolfgangmeyers:bazel-eclipse-file-generation

Conversation

@wolfgangmeyers

Copy link
Copy Markdown
Contributor

Simple python script to generate the .project and .classpath files
for eclipse. The script bundles all jar dependencies into a single
jar file, collects all auto-generated java files into a single
source folder and adds them to the eclipse classpath.

Comment thread WORKSPACE Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there any chance you can make the Linux x86_64 binary come directly from the vendor, as a separate download?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

On sourceforge there is only the 32 bit version. I can bundle the 64 bit version into this tar file instead, and the project could just require a 64 bit architecture to build.

@jart

jart commented Mar 4, 2016

Copy link
Copy Markdown
Contributor

Your script is not really integrated into the eclipse package. For example, it doesn't have a py_binary() rule. Maybe it would be more appropriate if this script was homed in the root project folder. Then you could easily dip into bazel-genfiles/.

Comment thread scripts/setup_eclipse.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think AutoValue generates files in bazel-genfiles/. Those files get generated directly into the jars.

You're probably better off allowing Eclipse to generate the AutoValue / Dagger / etc. magic code on its own, by manually adding the AV / Dagger / etc. jars to the project config for annotation processing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That does sound like a better route.

@wolfgangmeyers

Copy link
Copy Markdown
Contributor Author

"Your script is not really integrated into the eclipse package. For example, it doesn't have a py_binary() rule. Maybe it would be more appropriate if this script was homed in the root project folder. Then you could easily dip into bazel-genfiles/." - I'm not familiar with the eclipse integration or py_binary(). For the genfiles folder, it's easy to get with bazel info bazel-genfiles, regardless of script location. Happy to move it into the project root if that makes sense, just didn't want to clutter the root with scripts in case we added more.

@wolfgangmeyers

Copy link
Copy Markdown
Contributor Author

I think I see what you mean now, but it looks like py_binary() would be bazel integration?

@r-g-r

r-g-r commented Mar 4, 2016

Copy link
Copy Markdown
Contributor

QQ: is this mailing list the official github communications channel? If so,
is there any way we can add a footer or header or something that makes it
obvious that it's an external mailing list, so we don't accidentally leak
super secret information (or embarrassing lunch details)?

On Fri, Mar 4, 2016 at 1:42 PM, Wolfgang Meyers notifications@github.com
wrote:

I think I see what you mean now, but it looks like py_binary() would be
bazel integration?


Reply to this email directly or view it on GitHub
#1 (comment).

@jart

jart commented Mar 4, 2016

Copy link
Copy Markdown
Contributor

Unfortunately, no. I don't think it's possible to have GitHub notifications show a special header. But we can go back and delete GitHub comments if we need to.

@wolfgangmeyers

Copy link
Copy Markdown
Contributor Author

Merge conflicts are resolved. Anything else that I should change on this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove this line. It's the same as appengine-api-link except it's meant for unit tests.

@jart

jart commented Mar 8, 2016

Copy link
Copy Markdown
Contributor

This PR looks great. In a few hours, someone else from the team with Python readability is going to take a look. Sorry for the additional torture. But this is a good GitHub training opportunity.

Comment thread scripts/setup_eclipse.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Prefer check_call() and let the exception happen, here and throughout.

@wolfgangmeyers

Copy link
Copy Markdown
Contributor Author

@jart bazel-genfiles/javatests isn't generated during the build - causes an error if I include it. Not sure why this didn't happen earlier, but I plan to revert that with the next push.

@wolfgangmeyers

Copy link
Copy Markdown
Contributor Author

Another issue is that this code overwrites .settings/org.eclipse.jdt.core.prefs - if you import a code formatter, a lot of settings are dumped into this file.

@jart

jart commented Mar 8, 2016

Copy link
Copy Markdown
Contributor

I'd recommend adding a big # XXX: ... comment and then we'll iterate on it.

@wolfgangmeyers

Copy link
Copy Markdown
Contributor Author

Another issue I've noticed - there are a few classes generated that end in Factory_Factory - like RydePgpCompressionOutputStreamFactory_Factory. Although these are generated correctly by the annotation processors during the bazel build, they are not in eclipse, and nothing in the error logs suggests why. I do see errors like:
File not found: '/domain-registry/autogenerated/com/google/domain/registry/rde/RydeTarOutputStreamFactory_Factory.java' but no apparent upstream cause. This doesn't cause the main project any issues, but it does clutter the eclipse problems view with errors.

@jart

jart commented Mar 8, 2016

Copy link
Copy Markdown
Contributor

Those classes are generated by Dagger on code that's generated by
AutoFactory. There's probably an error in your Eclipse error logs. We had
problems internally with AutoFactory + Dagger until several months ago. Our
Eclipse support team fixed it. You might have to upgrade your Eclipse to
the latest version, or possibly to an even more bleeding edge version.

On Tue, Mar 8, 2016 at 6:22 PM Wolfgang Meyers notifications@github.com
wrote:

Another issue I've noticed - there are a few classes generated that end in
Factory_Factory - like RydePgpCompressionOutputStreamFactory_Factory.
Although these are generated correctly by the annotation processors during
the bazel build, they are not in eclipse, and nothing in the error logs
suggests why. I do see errors like:
File not found:
'/domain-registry/autogenerated/com/google/domain/registry/rde/RydeTarOutputStreamFactory_Factory.java'
but no apparent upstream cause.


Reply to this email directly or view it on GitHub
#1 (comment).

@wolfgangmeyers

Copy link
Copy Markdown
Contributor Author

Hmm good point, I do not have the latest version.

@r-g-r

r-g-r commented Mar 9, 2016

Copy link
Copy Markdown
Contributor

FWIW, LGTM for readability ...

@jart

jart commented Mar 9, 2016

Copy link
Copy Markdown
Contributor

LGTM. Please squash and I'll merge.

Simple python script to generate the .project and .classpath files
for eclipse. The script bundles all jar dependencies into a single
jar file, collects all auto-generated java files into a single
source folder and adds them to the eclipse classpath.
@wolfgangmeyers

Copy link
Copy Markdown
Contributor Author

Done.

jart added a commit that referenced this pull request Mar 9, 2016
@jart
jart merged commit fc4333a into google:master Mar 9, 2016
@jart

jart commented Mar 9, 2016

Copy link
Copy Markdown
Contributor

Thank you so much for your contribution @wolfgangmeyers

@jart

jart commented May 14, 2016

Copy link
Copy Markdown
Contributor

Unfortunately @CydeWeys the Google Python Style Guide externally is changed to be four spaces: https://google.github.io/styleguide/pyguide.html#Indentation I know. I know…

We discussed this earlier and I ended up capitulating. Mostly because I don't really use Python. You would have noticed that discussion if GitHub hadn't collapsed it 😦

screen shot 2016-05-14 at 1 11 36 pm

@wolfgangmeyers
wolfgangmeyers deleted the bazel-eclipse-file-generation branch June 7, 2016 16:15
mindhog added a commit that referenced this pull request Feb 19, 2019
weiminyu pushed a commit that referenced this pull request May 11, 2020
* Update first-steps-tutorial.md

* Update proxy-setup.md (#1)

* Update registrar-faq.md (#2)

* Update first-steps-tutorial.md
gbrodman added a commit to gbrodman/nomulus that referenced this pull request Aug 19, 2021
This won't do anything until we set the migration schedule to
DATASTORE_PRIMARY. Actions in order:

1. Add this cron job (it'll be a no-op)
2. Run the init-sql-pipeline to populate production's SQL DB
3. Set the SqlReplayCheckpoint to a time before the smear backup that
was used in step google#1 (maybe 30 minutes)
4. Set the database migration schedule to transition to
DATASTORE_PRIMARY at some point
gbrodman added a commit to gbrodman/nomulus that referenced this pull request Aug 20, 2021
This won't do anything until we set the migration schedule to
DATASTORE_PRIMARY. Actions in order:

1. Add this cron job (it'll be a no-op)
2. Run the init-sql-pipeline to populate production's SQL DB
3. Set the SqlReplayCheckpoint to a time before the smear backup that
was used in step google#1 (maybe 30 minutes)
4. Set the database migration schedule to transition to
DATASTORE_PRIMARY at some point
gbrodman added a commit that referenced this pull request Aug 23, 2021
* Add DS->SQL replay cron job to production

This won't do anything until we set the migration schedule to
DATASTORE_PRIMARY. Actions in order:

1. Add this cron job (it'll be a no-op)
2. Run the init-sql-pipeline to populate production's SQL DB
3. Set the SqlReplayCheckpoint to a time before the smear backup that
was used in step #1 (maybe 30 minutes)
4. Set the database migration schedule to transition to
DATASTORE_PRIMARY at some point
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

Successfully merging this pull request may close these issues.

4 participants