You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Michael Gibney (Jira)" <ji...@apache.org> on 2021/06/07 18:23:00 UTC

[jira] [Commented] (SOLR-15455) Facilitate joint Lucene/Solr local development workflow

    [ https://issues.apache.org/jira/browse/SOLR-15455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17358783#comment-17358783 ] 

Michael Gibney commented on SOLR-15455:
---------------------------------------

The attached patch, [^solr-lucene-snapshot-build.patch], introduces a system property ({{-DluceneSnapshot}}) that, if present, helps guide developers through making the necessary local modifications to support local tasks based on a 9.0.0-SNAPSHOT version of Lucene stored in {{mavenLocal()}} repo.

The comments in the patch explain a bit more, but basically it pre-parses the {{versions.props}} and {{versions.lock}} files in the configuration build phase, checks certain assumptions, and offers helpful tips. No files are actually modified, but if specifying the {{-DluceneSnapshot}} system property, users are directed to explicitly make any required changes.

The change to the {{solr-tests.policy}} security policy is necessary in order to support any runtime reference to jar files that live in the local maven repo (dependencies fetched by gradle from other repos are cached in a security-policy-accessible part of the filesystem, but {{mavenLocal()}} dependencies are accessed in-place, so we have to carve out an exception for Lucene in this case). It should be harmless \(?) to leave this exception statically in place regardless of whether a given build actually needs to access {{mavenLocal()}} (non-Lucene-SNAPSHOT version builds will not need this access).

The proposed workflow, in brief, would be:
# clone Lucene project and run {{gradlew mavenToLocalRepo}} from the project root
# change Lucene version in Solr {{version.props}} file to "9.0.0-SNAPSHOT"
# run {{gradlew -DluceneSnapshot test}} (or whatever task) and follow the instructions you get in the error messages until it works :-)

Skipping the "trial-and-error" portion of the last step of the above sequence, you'd do this:
# clone Lucene project and run {{gradlew mavenToLocalRepo}} from the project root
# change Lucene version in Solr {{version.props}} file to "9.0.0-SNAPSHOT"
# In top-level Solr project dir, run {{gradlew -DluceneSnapshot --update-locks 'org.apache.lucene:*'}} to update the {{versions.lock}} file to point to the local 9.0.0-SNAPSHOT versions
# subsequent tasks (e.g., {{gradlew -DluceneSnapshot test}}) should build/run against the Lucene SNAPSHOT jar files in {{mavenLocal()}}. 

I'm not thinking of the attached patch as a finished product, of course; just to help bootstrap discussion.

> Facilitate joint Lucene/Solr local development workflow
> -------------------------------------------------------
>
>                 Key: SOLR-15455
>                 URL: https://issues.apache.org/jira/browse/SOLR-15455
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Build
>    Affects Versions: main (9.0)
>            Reporter: Michael Gibney
>            Priority: Minor
>         Attachments: solr-lucene-snapshot-build.patch
>
>
> The recommended local development workflow for joint Lucene/Solr development post-TLP split requires some changes in order to work properly. The necessary changes are few, but there's also some opportunity (with minimal changes) to further ease the path for developers. This issue should also encompass documentation of the recommended workflow.
> Continued from a solr-dev [mailing list thread|https://mail-archives.apache.org/mod_mbox/solr-dev/202106.mbox/%3cCAJRvFdrYQU+HbzDiiMaXtSAB2e4nYEAis-3SFZw6V3zV3GyHHw@mail.gmail.com%3e].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org