{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":1911523,"defaultBranch":"master","name":"vert.x","ownerLogin":"eclipse-vertx","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2011-06-17T14:54:55.000Z","ownerAvatar":"https://github.com/avatars/u/19804680?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1726247410.0","currentOid":""},"activityList":{"items":[{"before":"67f9b5e76d32a60840de3baf6a7626765a213a91","after":"92e6c69d43d258557df92b25842dad8d4ec9011f","ref":"refs/heads/deployment","pushedAt":"2024-09-13T20:27:53.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Doc rewrite","shortMessageHtmlLink":"Doc rewrite"}},{"before":"a8889c430a04fbe2c0e3b50fd03d4efd18ae1408","after":"67f9b5e76d32a60840de3baf6a7626765a213a91","ref":"refs/heads/deployment","pushedAt":"2024-09-13T17:47:33.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Make compile despire of generic wildcards","shortMessageHtmlLink":"Make compile despire of generic wildcards"}},{"before":null,"after":"a8889c430a04fbe2c0e3b50fd03d4efd18ae1408","ref":"refs/heads/deployment","pushedAt":"2024-09-13T17:10:10.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Deployable interface providing a deployment contract that returns Future instead of consuming promises and can be a retrofit of Verticle.","shortMessageHtmlLink":"Deployable interface providing a deployment contract that returns Fut…"}},{"before":"79edb86aa10f64a0c0c970dc329a79e0f203b879","after":"ef710a7e4168ab0f6490403cdbcc042a4960ec9f","ref":"refs/heads/master","pushedAt":"2024-09-13T16:07:58.000Z","pushType":"pr_merge","commitsCount":7,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Merge pull request #5270 from lucamolteni/snappy\n\nSupport snappy compression","shortMessageHtmlLink":"Merge pull request #5270 from lucamolteni/snappy"}},{"before":"e095db4ed7e6f7555773abb977b9e979807d44c6","after":null,"ref":"refs/heads/completable","pushedAt":"2024-09-13T06:24:57.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"}},{"before":"e85a5c0b47758514bb7bcaedab5e274ff2be25c1","after":"4d0685e3c33d8aab3b64bf6fc66680b9ffddc08b","ref":"refs/heads/4.x","pushedAt":"2024-09-12T17:23:49.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tsegismont","name":"Thomas Segismont","path":"/tsegismont","primaryAvatarUrl":"https://github.com/avatars/u/1500598?s=80&v=4"},"commit":{"message":"Futurize MyVerticle start/stop example - backport to 4.x (#5315)\n\n(cherry picked from commit 31a03d7ae8075d29519272214989e111ef4e374e)\r\n\r\nSigned-off-by: Julian Ladisch \r\nCo-authored-by: Thomas Segismont ","shortMessageHtmlLink":"Futurize MyVerticle start/stop example - backport to 4.x (#5315)"}},{"before":"7c42984693c8aaee3eb7e6b0eaefe0229aa3cf4a","after":null,"ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-12T16:58:49.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"}},{"before":"9801071ef7908667708d96f1c26d5d06b58d631c","after":"79edb86aa10f64a0c0c970dc329a79e0f203b879","ref":"refs/heads/master","pushedAt":"2024-09-12T16:58:46.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Motivation:\n\nio.vertx.core.Future does not use variance in its declarations preventing reuse or forcing to introduce adapter functions, e.g.\n\npublic void flatMap(Future fut, Function> fn) {\n fut.flatMap(fn::apply); // produce a new function adapting \"fn\", it could be \"fn\" instead\n}\n\npublic void onComplete(Future fut, Promise promise) {\n // That\n fut.onComplete(event -> promise.handle(event.map(s -> s))); // we would like to use \"promise\" instead\n\n // Or\n fut.map(s -> (CharSequence)s).onComplete(promise);\n}\n\nChanges:\n\nThree changes are necessary to solve this problem at the expense of small breaking changes\n\n1. Use variance on existing methods\n\n// After\n flatMap(Function> fn);\n// After\n flatMap(Function> fn);\n\nThis changes remains source compatible (for user), there are breaking changes but those are for implementation of the `Future` type, which are acceptable.\n\nIt does not apply to Handler> arguments. In practice Handler> is solvable but not realistic, it should be Handler> but this one exhibit issues with lambdas, e.g. future.onComplete(ar -> ar.result() /* Object and not T */).\n\n2. Overloading handler of async results methods\n\nUse a functionnal interface accepting two arguments so a lambda will get the value and the error instead of the combined async result, pretty much like CompletionStage#whenComplete(BiConsumer).\n\nFuture onComplete(Handler> handler);\nFuture onComplete(Completable handler); // Overload\n\nLikewise\n\n Future transform(Function, Future> fn);\n Future transform(BiFunction> fn); // Overload\n\nwith\n\n@FunctionalInterface\npublic interface Completable {\n default void succeed(T value) {\n complete(value, null);\n }\n default void fail(Throwable cause) {\n complete(null, cause);\n }\n void complete(T value, Throwable err);\n}\n\nThere are a few breaking changes though, when null is an argument, the compiler cannot decide with overload to use. We consider those are marginal, we found some of these in the vertx test suite to check that null arguments produces errors, e.g. `future.onComplete(null)`.\n\n3. Retrofit Promise as Completable instead of async result handler\n\nSince now we have variant part with a Completable, we need Promise to extend Completable instead of Handler>\n\nPromise extends Completable {\n ...\n}\n\nThis creates breaking changes when Promise was used at the place of Handler>, e.g. internally in vertx we still have a few of those, and promise::handle should be used to fix the issues. Since Vert.x 5 does not anymore exhibit Handler> methods, this should not be an issue for users.\n\nThis will require adaptation in Vert.x code base because there are many remaining usage of `Handler>` idiom: here is a recap of the necessary changes https://gist.github.com/vietj/02ce9dc89c8a1c11dabe8828f760f973 . This list is actually quite long, however it mostly solves internal issues of the vertx codebase still using Vert.x 3 idioms and was never migrated to use futures, e.g. recent vertx components like the new _vertx-grpc_ or _vertx-service-resolver_ do not need any changes.","shortMessageHtmlLink":"Motivation:"}},{"before":"4bf9ee18d297292c5d349c150076929fbb8ba492","after":"7c42984693c8aaee3eb7e6b0eaefe0229aa3cf4a","ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-12T15:56:52.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Motivation:\n\nio.vertx.core.Future does not use variance in its declarations preventing reuse or forcing to introduce adapter functions, e.g.\n\npublic void flatMap(Future fut, Function> fn) {\n fut.flatMap(fn::apply); // produce a new function adapting \"fn\", it could be \"fn\" instead\n}\n\npublic void onComplete(Future fut, Promise promise) {\n // That\n fut.onComplete(event -> promise.handle(event.map(s -> s))); // we would like to use \"promise\" instead\n\n // Or\n fut.map(s -> (CharSequence)s).onComplete(promise);\n}\n\nChanges:\n\nThree changes are necessary to solve this problem at the expense of small breaking changes\n\n1. Use variance on existing methods\n\n// After\n flatMap(Function> fn);\n// After\n flatMap(Function> fn);\n\nThis changes remains source compatible (for user), there are breaking changes but those are for implementation of the `Future` type, which are acceptable.\n\nIt does not apply to Handler> arguments. In practice Handler> is solvable but not realistic, it should be Handler> but this one exhibit issues with lambdas, e.g. future.onComplete(ar -> ar.result() /* Object and not T */).\n\n2. Overloading handler of async results methods\n\nUse a functionnal interface accepting two arguments so a lambda will get the value and the error instead of the combined async result, pretty much like CompletionStage#whenComplete(BiConsumer).\n\nFuture onComplete(Handler> handler);\nFuture onComplete(Completable handler); // Overload\n\nLikewise\n\n Future transform(Function, Future> fn);\n Future transform(BiFunction> fn); // Overload\n\nwith\n\n@FunctionalInterface\npublic interface Completable {\n default void succeed(T value) {\n complete(value, null);\n }\n default void fail(Throwable cause) {\n complete(null, cause);\n }\n void complete(T value, Throwable err);\n}\n\nThere are a few breaking changes though, when null is an argument, the compiler cannot decide with overload to use. We consider those are marginal, we found some of these in the vertx test suite to check that null arguments produces errors, e.g. `future.onComplete(null)`.\n\n3. Retrofit Promise as Completable instead of async result handler\n\nSince now we have variant part with a Completable, we need Promise to extend Completable instead of Handler>\n\nPromise extends Completable {\n ...\n}\n\nThis creates breaking changes when Promise was used at the place of Handler>, e.g. internally in vertx we still have a few of those, and promise::handle should be used to fix the issues. Since Vert.x 5 does not anymore exhibit Handler> methods, this should not be an issue for users.\n\nThis will require adaptation in Vert.x code base because there are many remaining usage of `Handler>` idiom: here is a recap of the necessary changes https://gist.github.com/vietj/02ce9dc89c8a1c11dabe8828f760f973 . This list is actually quite long, however it mostly solves internal issues of the vertx codebase still using Vert.x 3 idioms and was never migrated to use futures, e.g. recent vertx components like the new _vertx-grpc_ or _vertx-service-resolver_ do not need any changes.","shortMessageHtmlLink":"Motivation:"}},{"before":"ab8c9654e64fe2ac13b7bd5eae55c937e3e3daa3","after":"4bf9ee18d297292c5d349c150076929fbb8ba492","ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-12T13:28:18.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Motivation:\n\nio.vertx.core.Future does not use variance in its declarations preventing reuse or forcing to introduce adapter functions, e.g.\n\npublic void flatMap(Future fut, Function> fn) {\n fut.flatMap(fn::apply); // produce a new function adapting \"fn\", it could be \"fn\" instead\n}\n\npublic void onComplete(Future fut, Promise promise) {\n // That\n fut.onComplete(event -> promise.handle(event.map(s -> s))); // we would like to use \"promise\" instead\n\n // Or\n fut.map(s -> (CharSequence)s).onComplete(promise);\n}\n\nChanges:\n\nThree changes are necessary to solve this problem at the expense of small breaking changes\n\n1. Use variance on existing methods\n\n// After\n flatMap(Function> fn);\n// After\n flatMap(Function> fn);\n\nThis changes remains source compatible (for user), there are breaking changes but those are for implementation of the `Future` type, which are acceptable.\n\nIt does not apply to Handler> arguments. In practice Handler> is solvable but not realistic, it should be Handler> but this one exhibit issues with lambdas, e.g. future.onComplete(ar -> ar.result() /* Object and not T */).\n\n2. Overloading handler of async results methods\n\nUse a functionnal interface accepting two arguments so a lambda will get the value and the error instead of the combined async result, pretty much like CompletionStage#whenComplete(BiConsumer).\n\nFuture onComplete(Handler> handler);\nFuture onComplete(Completable handler); // Overload\n\nLikewise\n\n Future transform(Function, Future> fn);\n Future transform(BiFunction> fn); // Overload\n\nwith\n\n@FunctionalInterface\npublic interface Completable {\n default void succeed(T value) {\n complete(value, null);\n }\n default void fail(Throwable cause) {\n complete(null, cause);\n }\n void complete(T value, Throwable err);\n}\n\nThere are a few breaking changes though, when null is an argument, the compiler cannot decide with overload to use. We consider those are marginal, we found some of these in the vertx test suite to check that null arguments produces errors, e.g. `future.onComplete(null)`.\n\n3. Retrofit Promise as Completable instead of async result handler\n\nSince now we have variant part with a Completable, we need Promise to extend Completable instead of Handler>\n\nPromise extends Completable {\n ...\n}\n\nThis creates breaking changes when Promise was used at the place of Handler>, e.g. internally in vertx we still have a few of those, and promise::handle should be used to fix the issues. Since Vert.x 5 does not anymore exhibit Handler> methods, this should not be an issue for users.\n\nThis will require adaptation in Vert.x code base because there are many remaining usage of `Handler>` idiom: here is a recap of the necessary changes https://gist.github.com/vietj/02ce9dc89c8a1c11dabe8828f760f973 . This list is actually quite long, however it mostly solves internal issues of the vertx codebase still using Vert.x 3 idioms and was never migrated to use futures, e.g. recent vertx components like the new _vertx-grpc_ or _vertx-service-resolver_ do not need any changes.","shortMessageHtmlLink":"Motivation:"}},{"before":"46473f2e3cfc2c750f619a3f96e864141321bbd1","after":"ab8c9654e64fe2ac13b7bd5eae55c937e3e3daa3","ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-12T11:11:47.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Motivation:\n\nio.vertx.core.Future does not use variance in its declarations preventing reuse or forcing to introduce adapter functions, e.g.\n\npublic void flatMap(Future fut, Function> fn) {\n fut.flatMap(fn::apply); // produce a new function adapting \"fn\", it could be \"fn\" instead\n}\n\npublic void onComplete(Future fut, Promise promise) {\n // That\n fut.onComplete(event -> promise.handle(event.map(s -> s))); // we would like to use \"promise\" instead\n\n // Or\n fut.map(s -> (CharSequence)s).onComplete(promise);\n}\n\nChanges:\n\nThree changes are necessary to solve this problem at the expense of small breaking changes\n\n1. Use variance on existing methods\n\n// After\n flatMap(Function> fn);\n// After\n flatMap(Function> fn);\n\nThis changes remains source compatible (for user), there are breaking changes but those are for implementation of the `Future` type, which are acceptable.\n\nIt does not apply to Handler> arguments. In practice Handler> is solvable but not realistic, it should be Handler> but this one exhibit issues with lambdas, e.g. future.onComplete(ar -> ar.result() /* Object and not T */).\n\n2. Overloading handler of async results methods\n\nUse a functionnal interface accepting two arguments so a lambda will get the value and the error instead of the combined async result, pretty much like CompletionStage#whenComplete(BiConsumer).\n\nFuture onComplete(Handler> handler);\nFuture onComplete(Completable handler); // Overload\n\nLikewise\n\n Future transform(Function, Future> fn);\n Future transform(BiFunction> fn); // Overload\n\nwith\n\n@FunctionalInterface\npublic interface Completable {\n default void succeed(T value) {\n complete(value, null);\n }\n default void fail(Throwable cause) {\n complete(null, cause);\n }\n void complete(T value, Throwable err);\n}\n\nThere are a few breaking changes though, when null is an argument, the compiler cannot decide with overload to use. We consider those are marginal, we found some of these in the vertx test suite to check that null arguments produces errors, e.g. `future.onComplete(null)`.\n\n3. Retrofit Promise as Completable instead of async result handler\n\nSince now we have variant part with a Completable, we need Promise to extend Completable instead of Handler>\n\nPromise extends Completable {\n ...\n}\n\nThis creates breaking changes when Promise was used at the place of Handler>, e.g. internally in vertx we still have a few of those, and promise::handle should be used to fix the issues. Since Vert.x 5 does not anymore exhibit Handler> methods, this should not be an issue for users.\n\nThis will require adaptation in Vert.x code base because there are many remaining usage of `Handler>` idiom: here is a recap of the necessary changes https://gist.github.com/vietj/02ce9dc89c8a1c11dabe8828f760f973 . This list is actually quite long, however it mostly solves internal issues of the vertx codebase still using Vert.x 3 idioms and was never migrated to use futures, e.g. recent vertx components like the new _vertx-grpc_ or _vertx-service-resolver_ do not need any changes.","shortMessageHtmlLink":"Motivation:"}},{"before":"578ac28c93100dad62c84c02b00e9f5dd1d4e924","after":"46473f2e3cfc2c750f619a3f96e864141321bbd1","ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-12T09:54:16.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Motivation:\n\nio.vertx.core.Future does not use variance in its declarations preventing reuse or forcing to introduce adapter functions, e.g.\n\npublic void flatMap(Future fut, Function> fn) {\n fut.flatMap(fn::apply); // produce a new function adapting \"fn\", it could be \"fn\" instead\n}\n\npublic void onComplete(Future fut, Promise promise) {\n // That\n fut.onComplete(event -> promise.handle(event.map(s -> s))); // we would like to use \"promise\" instead\n\n // Or\n fut.map(s -> (CharSequence)s).onComplete(promise);\n}\n\nChanges:\n\nThree changes are necessary to solve this problem at the expense of small breaking changes\n\n1. Use variance on existing methods\n\n// After\n flatMap(Function> fn);\n// After\n flatMap(Function> fn);\n\nThis changes remains source compatible (for user), there are breaking changes but those are for implementation of the `Future` type, which are acceptable.\n\nIt does not apply to Handler> arguments. In practice Handler> is solvable but not realistic, it should be Handler> but this one exhibit issues with lambdas, e.g. future.onComplete(ar -> ar.result() /* Object and not T */).\n\n2. Overloading handler of async results methods\n\nUse a functionnal interface accepting two arguments so a lambda will get the value and the error instead of the combined async result, pretty much like CompletionStage#whenComplete(BiConsumer).\n\nFuture onComplete(Handler> handler);\nFuture onComplete(Completable handler); // Overload\n\nLikewise\n\n Future transform(Function, Future> fn);\n Future transform(BiFunction> fn); // Overload\n\nwith\n\n@FunctionalInterface\npublic interface Completable {\n default void succeed(T value) {\n complete(value, null);\n }\n default void fail(Throwable cause) {\n complete(null, cause);\n }\n void complete(T value, Throwable err);\n}\n\nThere are a few breaking changes though, when null is an argument, the compiler cannot decide with overload to use. We consider those are marginal, we found some of these in the vertx test suite to check that null arguments produces errors, e.g. `future.onComplete(null)`.\n\n3. Retrofit Promise as Completable instead of async result handler\n\nSince now we have variant part with a Completable, we need Promise to extend Completable instead of Handler>\n\nPromise extends Completable {\n ...\n}\n\nThis creates breaking changes when Promise was used at the place of Handler>, e.g. internally in vertx we still have a few of those, and promise::handle should be used to fix the issues. Since Vert.x 5 does not anymore exhibit Handler> methods, this should not be an issue for users.\n\nThis will require adaptation in Vert.x code base because there are many remaining usage of `Handler>` idiom: here is a recap of the necessary changes https://gist.github.com/vietj/02ce9dc89c8a1c11dabe8828f760f973 . This list is actually quite long, however it mostly solves internal issues of the vertx codebase still using Vert.x 3 idioms and was never migrated to use futures, e.g. recent vertx components like the new _vertx-grpc_ or _vertx-service-resolver_ do not need any changes.","shortMessageHtmlLink":"Motivation:"}},{"before":"0200ec60cb2f0bb3985996405bb5ba74c08bdd65","after":"578ac28c93100dad62c84c02b00e9f5dd1d4e924","ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-12T08:49:54.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Motivation:\n\nio.vertx.core.Future does not use variance in its declarations preventing reuse or forcing to introduce adapter functions, e.g.\n\npublic void flatMap(Future fut, Function> fn) {\n fut.flatMap(fn::apply); // produce a new function adapting \"fn\", it could be \"fn\" instead\n}\n\npublic void onComplete(Future fut, Promise promise) {\n // That\n fut.onComplete(event -> promise.handle(event.map(s -> s))); // we would like to use \"promise\" instead\n\n // Or\n fut.map(s -> (CharSequence)s).onComplete(promise);\n}\n\nChanges:\n\nThree changes are necessary to solve this problem at the expense of small breaking changes\n\n1. Use variance on existing methods\n\n// After\n flatMap(Function> fn);\n// After\n flatMap(Function> fn);\n\nThis changes remains source compatible (for user), there are breaking changes but those are for implementation of the `Future` type, which are acceptable.\n\nIt does not apply to Handler> arguments. In practice Handler> is solvable but not realistic, it should be Handler> but this one exhibit issues with lambdas, e.g. future.onComplete(ar -> ar.result() /* Object and not T */).\n\n2. Overloading handler of async results methods\n\nUse a functionnal interface accepting two arguments so a lambda will get the value and the error instead of the combined async result, pretty much like CompletionStage#whenComplete(BiConsumer).\n\nFuture onComplete(Handler> handler);\nFuture onComplete(Completable handler); // Overload\n\nLikewise\n\n Future transform(Function, Future> fn);\n Future transform(BiFunction> fn); // Overload\n\nwith\n\n@FunctionalInterface\npublic interface Completable {\n default void succeed(T value) {\n complete(value, null);\n }\n default void fail(Throwable cause) {\n complete(null, cause);\n }\n void complete(T value, Throwable err);\n}\n\nThere are a few breaking changes though, when null is an argument, the compiler cannot decide with overload to use. We consider those are marginal, we found some of these in the vertx test suite to check that null arguments produces errors, e.g. `future.onComplete(null)`.\n\n3. Retrofit Promise as Completable instead of async result handler\n\nSince now we have variant part with a Completable, we need Promise to extend Completable instead of Handler>\n\nPromise extends Completable {\n ...\n}\n\nThis creates breaking changes when Promise was used at the place of Handler>, e.g. internally in vertx we still have a few of those, and promise::handle should be used to fix the issues. Since Vert.x 5 does not anymore exhibit Handler> methods, this should not be an issue for users.\n\nThis will require adaptation in Vert.x code base because there are many remaining usage of `Handler>` idiom: here is a recap of the necessary changes https://gist.github.com/vietj/02ce9dc89c8a1c11dabe8828f760f973 . This list is actually quite long, however it mostly solves internal issues of the vertx codebase still using Vert.x 3 idioms and was never migrated to use futures, e.g. recent vertx components like the new _vertx-grpc_ or _vertx-service-resolver_ do not need any changes.","shortMessageHtmlLink":"Motivation:"}},{"before":"e2d81ec22e3645b8a417b7041007effe8ac48993","after":"0200ec60cb2f0bb3985996405bb5ba74c08bdd65","ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-12T08:47:27.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Motivation:\n\nio.vertx.core.Future does not use variance in its declarations preventing reuse or forcing to introduce adapter functions, e.g.\n\npublic void flatMap(Future fut, Function> fn) {\n fut.flatMap(fn::apply); // produce a new function adapting \"fn\", it could be \"fn\" instead\n}\n\npublic void onComplete(Future fut, Promise promise) {\n // That\n fut.onComplete(event -> promise.handle(event.map(s -> s))); // we would like to use \"promise\" instead\n\n // Or\n fut.map(s -> (CharSequence)s).onComplete(promise);\n}\n\nChanges:\n\nThree changes are necessary to solve this problem at the expense of small breaking changes\n\n1. Use variance on existing methods\n\n// After\n flatMap(Function> fn);\n// After\n flatMap(Function> fn);\n\nThis changes remains source compatible (for user), there are breaking changes but those are for implementation of the `Future` type, which are acceptable.\n\nIt does not apply to Handler> arguments. In practice Handler> is solvable but not realistic, it should be Handler> but this one exhibit issues with lambdas, e.g. future.onComplete(ar -> ar.result() /* Object and not T */).\n\n2. Overloading handler of async results methods\n\nUse a functionnal interface accepting two arguments so a lambda will get the value and the error instead of the combined async result, pretty much like CompletionStage#whenComplete(BiConsumer).\n\nFuture onComplete(Handler> handler);\nFuture onComplete(Completable handler); // Overload\n\nLikewise\n\n Future transform(Function, Future> fn);\n Future transform(BiFunction> fn); // Overload\n\nwith\n\n@FunctionalInterface\npublic interface Completable {\n default void succeed(T value) {\n complete(value, null);\n }\n default void fail(Throwable cause) {\n complete(null, cause);\n }\n void complete(T value, Throwable err);\n}\n\nThere are a few breaking changes though, when null is an argument, the compiler cannot decide with overload to use. We consider those are marginal, we found some of these in the vertx test suite to check that null arguments produces errors, e.g. `future.onComplete(null)`.\n\n3. Retrofit Promise as Completable instead of async result handler\n\nSince now we have variant part with a Completable, we need Promise to extend Completable instead of Handler>\n\nPromise extends Completable {\n ...\n}\n\nThis creates breaking changes when Promise was used at the place of Handler>, e.g. internally in vertx we still have a few of those, and promise::handle should be used to fix the issues. Since Vert.x 5 does not anymore exhibit Handler> methods, this should not be an issue for users.\n\nThis will require adaptation in Vert.x code base because there are many remaining usage of `Handler>` idiom: here is a recap of the necessary changes https://gist.github.com/vietj/02ce9dc89c8a1c11dabe8828f760f973 . This list is actually quite long, however it mostly solves internal issues of the vertx codebase still using Vert.x 3 idioms and was never migrated to use futures, e.g. recent vertx components like the new _vertx-grpc_ or _vertx-service-resolver_ do not need any changes.","shortMessageHtmlLink":"Motivation:"}},{"before":"50aca5460ed0a25535ab47585cc3dba21461d3ce","after":"e2d81ec22e3645b8a417b7041007effe8ac48993","ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-12T08:18:34.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Try remove listener","shortMessageHtmlLink":"Try remove listener"}},{"before":"a025a60021ce9bf326fe1e0d8e69b01d66bea423","after":"50aca5460ed0a25535ab47585cc3dba21461d3ce","ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-12T08:00:04.000Z","pushType":"push","commitsCount":3,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Try remove listener","shortMessageHtmlLink":"Try remove listener"}},{"before":"18dc8f5d2cd368e7eb77a8a2040d62ddbfd25b81","after":"a025a60021ce9bf326fe1e0d8e69b01d66bea423","ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-11T16:33:39.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Alternative version with Completable","shortMessageHtmlLink":"Alternative version with Completable"}},{"before":"df923fd7f283f3ea4e8ec73379d60d507ae7204c","after":"18dc8f5d2cd368e7eb77a8a2040d62ddbfd25b81","ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-11T16:17:02.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Promise extends BiConsumer instead of Handler>","shortMessageHtmlLink":"Promise<T> extends BiConsumer<T, Throwable> instead of Handler<AsyncR…"}},{"before":"b0c48b8a0599f2ef745b1c6db771c00c80c409bf","after":"df923fd7f283f3ea4e8ec73379d60d507ae7204c","ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-11T14:38:06.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Promise extends BiConsumer instead of Handler>","shortMessageHtmlLink":"Promise<T> extends BiConsumer<T, Throwable> instead of Handler<AsyncR…"}},{"before":null,"after":"b0c48b8a0599f2ef745b1c6db771c00c80c409bf","ref":"refs/heads/introduce-future-promise-variance","pushedAt":"2024-09-11T13:39:56.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Promise extends BiConsumer instead of Handler>","shortMessageHtmlLink":"Promise<T> extends BiConsumer<T, Throwable> instead of Handler<AsyncR…"}},{"before":null,"after":"e095db4ed7e6f7555773abb977b9e979807d44c6","ref":"refs/heads/completable","pushedAt":"2024-09-11T11:06:01.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Completable/Deployment prototype.","shortMessageHtmlLink":"Completable/Deployment prototype."}},{"before":"20363a7bfc8c0c24bf8dc085df2f9b53f6ddbb4a","after":null,"ref":"refs/heads/remove-netty-deprecation-usage","pushedAt":"2024-09-10T18:45:27.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"}},{"before":"04b1e4d9045e8cfa8bfdb23aa034313fb4860680","after":"9801071ef7908667708d96f1c26d5d06b58d631c","ref":"refs/heads/master","pushedAt":"2024-09-10T18:45:20.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Remove most Netty deprecation usage, at least those that prevents integrating io_uring in vertx-core.","shortMessageHtmlLink":"Remove most Netty deprecation usage, at least those that prevents int…"}},{"before":"979f0a346c305ba0685b9c2aeead4b2969911486","after":"20363a7bfc8c0c24bf8dc085df2f9b53f6ddbb4a","ref":"refs/heads/remove-netty-deprecation-usage","pushedAt":"2024-09-10T17:57:37.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Remove most Netty deprecation usage, at least those that prevents integrating io_uring in vertx-core.","shortMessageHtmlLink":"Remove most Netty deprecation usage, at least those that prevents int…"}},{"before":"e86a27dd88f79e7faaa85bc6567cd863f0a33dd3","after":"e85a5c0b47758514bb7bcaedab5e274ff2be25c1","ref":"refs/heads/4.x","pushedAt":"2024-09-10T17:46:52.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Save parsing twice numeric IPv4 address","shortMessageHtmlLink":"Save parsing twice numeric IPv4 address"}},{"before":null,"after":"1539af401614647a49f575452eecd261a0d39d97","ref":"refs/heads/clustering-cleanup","pushedAt":"2024-09-10T17:00:11.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Decouple the cluster manager interface from NodeSelector and make this class an implementation details.\n\nMotivation:\n\nThe NodeSelector interface has currently a single implementation and is exposed to the cluster manager. The NodeSelector interface combines two API, an API selecting node used by the event bus, an API for broadcasting changes to the node selector implementation used by the cluster manager. The cluster manager exposed API should be reduced to the methods it is intended to use, this also allows to reduce the SPI surface of the cluster manager SPI.\n\nChanges:\n\nExtract the RegistrationListener out of NodeSelector, the ClusterManager interface gets getter/setter for the registration listener, similar to the NodeListener.\n\nThe NodeSelector is moved to the cluster manager SPI impl package and is not exposed anymore.\n\nThis is an SPI breaking change.","shortMessageHtmlLink":"Decouple the cluster manager interface from NodeSelector and make thi…"}},{"before":"1d6f24978261931406b5a1463e6bae1d7bb99294","after":"04b1e4d9045e8cfa8bfdb23aa034313fb4860680","ref":"refs/heads/master","pushedAt":"2024-09-10T15:22:07.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Remove EventExecutorProvider from the module-info uses declarations since it is a service provider","shortMessageHtmlLink":"Remove EventExecutorProvider from the module-info uses declarations s…"}},{"before":"2d61017c5dbe64d59913dea465d2c681c0a2d7e9","after":null,"ref":"refs/heads/deprecate-service-helper-class-4.x","pushedAt":"2024-09-10T15:17:17.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"}},{"before":"1593f16c33903d05ec247793aec48e5ab82e926f","after":"e86a27dd88f79e7faaa85bc6567cd863f0a33dd3","ref":"refs/heads/4.x","pushedAt":"2024-09-10T15:17:14.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"},"commit":{"message":"Deprecate io.vertx.core.ServiceHelper.\n\nMotivation:\n\nThe ServiceHelper utility class is mostly used internally by vertx service providers to load plugins. Users should not use this class. In addition service loading strategies might change in Vert.x 5 due to the support of JPMS. In addition this reduces the API surface.\n\nChanges:\n\nDeprecate io.vertx.core.ServiceHelper\n\nResult:\n\nServiceHelper is deprecated.","shortMessageHtmlLink":"Deprecate io.vertx.core.ServiceHelper."}},{"before":"1b13e5b001a44703fe1d33b5fa3883a082a47440","after":null,"ref":"refs/heads/testsuite-improvements","pushedAt":"2024-09-10T15:17:09.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"vietj","name":"Julien Viet","path":"/vietj","primaryAvatarUrl":"https://github.com/avatars/u/225674?s=80&v=4"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOS0xM1QyMDoyNzo1My4wMDAwMDBazwAAAAS13QaC","startCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOS0xM1QyMDoyNzo1My4wMDAwMDBazwAAAAS13QaC","endCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOS0xMFQxNToxNzowOS4wMDAwMDBazwAAAASyOMEq"}},"title":"Activity · eclipse-vertx/vert.x"}