[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17256998#comment-17256998 ] Erick Erickson commented on SOLR-14469: --- I won't be working on JIRAs for the foreseeable future > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17220120#comment-17220120 ] Erick Erickson commented on SOLR-14469: --- See Smiley's DeprecationLog class too? > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Assignee: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17220116#comment-17220116 ] Erick Erickson commented on SOLR-14469: --- Who knows? Maybe I'll get to this as winter closes in... Java9 has "since" and "forRemoval" parameters. WDYT about requiring those tags and failing as part of validating source patterns if not present? Currently, to know whether the intent is to remove something if the comments aren't in place in the javadocs, you have to go to the JIRA and see what version the annotation was added in and then guess. Mechanically, that's easy with Git annotate on a one-by-one basis, but I don't see any good way to get a list of all the deprecations that could be removed in version X. Although until we resolve the reference impl, it'd be a lot of fiddly work that might have to be repeated... > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Assignee: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17155400#comment-17155400 ] Erick Erickson commented on SOLR-14469: --- Oooh, thanks [~dsmiley]. I'd have just jumped in and missed that entirely. > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Assignee: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17155126#comment-17155126 ] David Smiley commented on SOLR-14469: - As you pursue this, remember to use the \{{master-deprecations}} branch, which was set up by Alan and I've done some significant. work there already for solr-core. > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Assignee: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17154692#comment-17154692 ] Erick Erickson commented on SOLR-14469: --- "The negatives are currently no-ops" Yeah, I understand that. Patience! I'll get to this JIRA soon ;) I hope. FWIW, I consider this JIRA something of a placeholder. I intend to dive into this and hack around for a while to see what patterns emerge. Your suggestions here are probably the way it'll go, this discusssion has saved me some fumbling around. Part of the motivation is code clean-up, I think we have stuff deprecated in 4x or earlier that's never been cleaned up. It's also extremely frustrating to see deprecation annotations with no indication of _when_ they were deprecated or _what_ to use in their place. I think of it as another barrier to keeping code clean that we can/should remove. I'm also certain that the person doing the deprecation has the very best chance of efficiently updating the usages at the time the call is deprecated! So my tentative thoughts here are: 1> do some labeling enforcement. Require the deprecation to say when and what to use instead. TBD is how that interacts with javadocs checks. 2> Yeah, I don't see how to fail compilations and still evolve the code. I like in-your-face failures wy early in the process, but the end goal of not allowing cruft to accumulate is served by check failures. 3> I like the forbiddenAPIs idea and I know you put some effort into that in Gradle that I haven't looked at how to use yet ;). We can use this approach to build up one fix at a time; that'd allow gradual improvement rather than the sledgehammer of using compile failures which is untenable. It also provides a mechanism for cleaning things up when the deprecations are made. I'd really like to _strongly_ encourage people who add deprectations to clean up the internal usages at the same time since they know exactly what to do (at least they better!). For use-cases that require the deprecated calls to stay (say changing a method's visibility as someone pointed out) we can use SuppressForbidden. 4> As far as actually removing deprecation annotations, I think there are two phases: 4.1> I see no reason we can't "do the right thing" in trunk for any deprecation added prior to 8.0. It won't always be removing the code. 4.2> For deprecations added in 8x, fix up all the internal calls and add them to ForbiddenAPIs. This is my straw-man proposal, as I mentioned before I'll try doing some of it and see if it makes sense and report back. Thanks again for your suggestions, they really helped me clarify a path forward. Any plan is better than fumbling around blindly, even if it turns out to be sub-optimal... > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Assignee: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17154040#comment-17154040 ] Uwe Schindler commented on SOLR-14469: -- Adding {{Xlint:deprecation}} makes sense for a job like the one here: remove deprecations before a relaese. But it should not be a general flag enabled for javac, as it makes adding new deprecations also close to impossible. > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Assignee: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17154037#comment-17154037 ] Uwe Schindler commented on SOLR-14469: -- The negatives are currently no-ops, because we only explicitely enable warnings. I don't think (as David Smiley also mentioned), that {{Xlint:deprecation}} (enable!!!) should be added, because this makes usage of Solr's own deprecations impossible. This is by the way one reason why we have forbiddenapis and its "jdk-deprecated" signatures file. It differs from this warning in a way that only calls to Java are forbidden, but you still can call all other code marked as deprecated, including your own. So in short: Use forbiddenapis to explicitely disable deprecated stuff (like done with jdk's deprecations). On the Solr/Lucene API side, we should have clear rules how the message looks like. But this more something for the source-patterns checker. > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Assignee: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17154030#comment-17154030 ] Erick Erickson commented on SOLR-14469: --- Remember to take out negatives from defaults-java.gradle > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Assignee: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17130678#comment-17130678 ] Erick Erickson commented on SOLR-14469: --- There's some discussion at: LUCENE-9394... > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Assignee: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17130595#comment-17130595 ] Erick Erickson commented on SOLR-14469: --- {quote}I'm just unsure of the value of trying to automate this best practice to insist on it. {quote} Well, moral 'suasion and nagging don't seem to be helping us clean up code. We have deprecations here from _at least_ as far back as 6.0. Failing hard would help us cut down on cruft. Admittedly it's a harsh cure, but what we're doing now isn't working, doing more of the same doesn't strike me as a way to move forward. > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Assignee: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17115034#comment-17115034 ] David Smiley commented on SOLR-14469: - I'd prefer we do nothing more than what we're already doing -- leave the {{-Xlint:-deprecation}} in {{defaults-java.gradle}}. I think it's a nice "best practice" for our deprecations to have helpful info on what to do. I'm just unsure of the value of trying to automate this best practice to insist on it. > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Assignee: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14469) Removed deprecated code in solr/core (master only)
[ https://issues.apache.org/jira/browse/SOLR-14469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17113131#comment-17113131 ] Erick Erickson commented on SOLR-14469: --- One idea that has come up is to deal with the problem of accumulating cruft via precommit rather than fail compilations. So one idea is to fail precommit (again, master only and gradle) if: 1. the deprecation annotation doesn't have a "remove in..." message, exact form TBD 2. the deprecation annotation doesn't have an indication of what to do instead (use method ###, delete, ...), exact form TBD 3. Given <1>, fail if the Lucene/Solr version that's being checked is >= the version mentioned in the annotation. That would make cutting the next major version more painful, all the deprecations to be removed in that major version would have to be dealt with all at once. In extremis, we could defer the code changes by bumping the version mentioned in the annotation One consequence of this approach would be that merging from master to master-1 might would get messier, but it's not at all clear to me how much messier... > Removed deprecated code in solr/core (master only) > -- > > Key: SOLR-14469 > URL: https://issues.apache.org/jira/browse/SOLR-14469 > Project: Solr > Issue Type: Sub-task >Reporter: Erick Erickson >Assignee: Erick Erickson >Priority: Major > > I'm currently working on getting all the warnings out of the code, so this is > something of a placeholder for a week or two. > There will be sub-tasks, please create them when you start working on a > project. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org