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

Remove armeria-brave module #5453

Merged
merged 4 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions brave/brave/build.gradle

This file was deleted.

18 changes: 11 additions & 7 deletions brave/brave5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ dependencies {
}

def brave6ProjectDir = "${rootProject.projectDir}/brave/brave6"
tasks.compileJava.source "${brave6ProjectDir}/src/main/java"
tasks.processResources.from "${brave6ProjectDir}/src/main/resources"
tasks.compileTestJava.source "${brave6ProjectDir}/src/test/java"
tasks.processTestResources.from "${brave6ProjectDir}/src/test/resources"
tasks.sourcesJar.from "${brave6ProjectDir}/src/main/java"
tasks.sourcesJar.from "${brave6ProjectDir}/src/main/resources"
tasks.javadoc.source "${brave6ProjectDir}/src/main/java"

tasks.register('generateSources', Copy.class) {
Copy link
Member

Choose a reason for hiding this comment

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

curious do we prefer to use the convention like

def generateSources =  tasks.register('generateSources', Copy.class) {
...
}

tasks.named("compileJava").dependsOn(generateSources)

Copy link
Member

@minwoox minwoox Feb 24, 2024

Choose a reason for hiding this comment

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

Could you let me know if you are suggesting this convention? Or are you just asking? 😆
If you are suggesting it, could you share the reason, please? 😉 cc @jrhee17

Copy link
Member

Choose a reason for hiding this comment

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

Maybe both, it's good to avoid some configuration time. And saw our native-image-config using similar way.
Notice this recently https://docs.gradle.org/current/userguide/task_configuration_avoidance.html

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for sharing the link. I wasn't aware that we were using an anti-pattern. 😓 Since we've employed this pattern across all our build files, let me create another PR to address this issue.

Avoid referencing a task by name. In the majority of cases, referencing a task by name is a fragile pattern and should be avoided. Although the task name is available on the TaskProvider, effort should be made to use references from a strongly typed model instead.

from "${brave6ProjectDir}/src"
into "${project.ext.genSrcDir}"
exclude '**/package-info.java'
}

tasks.compileJava.dependsOn(generateSources)
tasks.processResources.dependsOn(generateSources)
tasks.compileTestJava.dependsOn(generateSources)
tasks.processTestResources.dependsOn(generateSources)

ext {
testThriftSrcDirs = ["$brave6ProjectDir/src/test/thrift"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2019 LINE Corporation
Copy link
Member

Choose a reason for hiding this comment

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

using 2024 for new file?

Copy link
Member

Choose a reason for hiding this comment

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

I believe this wasn't a new file because we used to have it but we moved it to another module and back here again. 😆 So let me just keep the year.

*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

/**
* Distributed tracing services based on <a href="https://github.com/openzipkin/brave">Brave</a>,
* a Java tracing library compatible with <a href="http://zipkin.io/">Zipkin</a>.
*
* @deprecated Use armeria-brave6 module.
* See <a href="https://armeria.dev/release-notes/1.28.0#%EF%B8%8F-breaking-changes">
* 1.28 Breaking Changes</a> for more information.
*/
@Deprecated
@NonNullByDefault
package com.linecorp.armeria.client.brave;

import com.linecorp.armeria.common.annotation.NonNullByDefault;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2019 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

/**
* Distributed tracing services based on <a href="https://github.com/openzipkin/brave">Brave</a>,
* a Java tracing library compatible with <a href="http://zipkin.io/">Zipkin</a>.
*
* @deprecated Use armeria-brave6 module.
* See <a href="https://armeria.dev/release-notes/1.28.0#%EF%B8%8F-breaking-changes">
* 1.28 Breaking Changes</a> for more information.
*/
@Deprecated
@NonNullByDefault
package com.linecorp.armeria.common.brave;

import com.linecorp.armeria.common.annotation.NonNullByDefault;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2019 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

/**
* Distributed tracing services based on <a href="https://github.com/openzipkin/brave">Brave</a>,
* a Java tracing library compatible with <a href="http://zipkin.io/">Zipkin</a>.
*
* @deprecated Use armeria-brave6 module.
* See <a href="https://armeria.dev/release-notes/1.28.0#%EF%B8%8F-breaking-changes">
* 1.28 Breaking Changes</a> for more information.
*/
@Deprecated
@NonNullByDefault
package com.linecorp.armeria.internal.common.brave;

import com.linecorp.armeria.common.annotation.NonNullByDefault;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2019 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

/**
* Distributed tracing services based on <a href="https://github.com/openzipkin/brave">Brave</a>,
* a Java tracing library compatible with <a href="http://zipkin.io/">Zipkin</a>.
*
* @deprecated Use armeria-brave6 module.
* See <a href="https://armeria.dev/release-notes/1.28.0#%EF%B8%8F-breaking-changes">
* 1.28 Breaking Changes</a> for more information.
*/
@Deprecated
@NonNullByDefault
package com.linecorp.armeria.server.brave;

import com.linecorp.armeria.common.annotation.NonNullByDefault;
2 changes: 1 addition & 1 deletion dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assertj = "3.25.2"
awaitility = "4.2.0"
blockhound = "1.0.8.RELEASE"
bouncycastle = "1.70"
brave5 = "5.18.0"
brave5 = "5.18.1"
brave6 = "6.0.0"
brotli4j = "1.15.0"
bucket4j = "7.6.0"
Expand Down
2 changes: 0 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ includeWithFlags ':version-catalog', 'version-catalog'

// Published Java projects
includeWithFlags ':annotation-processor', 'java', 'publish', 'relocate'
includeWithFlags ':brave', 'java', 'publish', 'relocate', 'no_aggregation'
project(':brave').projectDir = file('brave/brave')
includeWithFlags ':brave5', 'java', 'publish', 'relocate', 'no_aggregation'
project(':brave5').projectDir = file('brave/brave5')
includeWithFlags ':brave6', 'java', 'publish', 'relocate', 'native'
Expand Down