playframework / playframework/play-ws

Source code for shaded jars are not properly published along with the shaded jars

Open
#683 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
224
Forks
92
Avg merge
1d 19h
Merged PRs (30d)
28

Description

The problem is when attaching debugger with a running process using any shaded library. The non-shaded source code won't bind with the shaded classes that belong to the shaded packages such as

package play.shaded.ahc.io.netty.channel.nio;
...
public abstract class AbstractNioChannel extends AbstractChannel {

The source code is still 266 bytes, see, https://repo1.maven.org/maven2/com/typesafe/play/shaded-asynchttpclient/2.1.3/

So any plan to correctly publish shaded sources?

A workaround in case someone needs it

$ cd netty
$ mkdir -p transport/src/main/java/play/shaded/ahc
$ cp -a transport/src/main/java/io transport/src/main/java/play/shaded/ahc/.
$ find transport/src/main/java/play/shaded/ahc -name "*.java" -exec sed -i 's#package io\.#package play.shaded.ahc.io.#' {} \; -exec sed -i 's#import io\.#import play.shaded.ahc.io.#' {} \; -exec sed -i 's#import static io\.#import static play.shaded.ahc.io.#' {} \;

Originally posted by @jhooda in https://github.com/playframework/play-ws/issues/85#issuecomment-1130406025

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the shaded artifact contents at the Maven repository URL and the Netty path transport/src/main/java mentioned in the workaround. Verify how shaded packages are represented in the published source archive; done means the source files match the shaded class packages so a debugger can bind to them.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.