Skip to content

Commit aecb40a

Browse files
committed
Revert "refactor: Remove Bloop4j as it seems not to be used at all"
This reverts commit 2a4ee42.
1 parent 7653717 commit aecb40a

File tree

3 files changed

+114
-3
lines changed

3 files changed

+114
-3
lines changed
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// from https://github.com/scalacenter/bloop/blob/f599f9bb4cbd63bac64eddf071e5283b27357db4/bloop4j/src/main/java/bloop/bloop4j/BloopExtraBuildParams.java
2+
3+
package bloop.rifle.bloop4j;
4+
5+
import java.util.List;
6+
import org.eclipse.xtext.xbase.lib.Pure;
7+
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
8+
9+
@SuppressWarnings("all")
10+
public class BloopExtraBuildParams {
11+
private Boolean ownsBuildFiles;
12+
13+
private String clientClassesRootDir;
14+
15+
private String semanticdbVersion;
16+
17+
private List<String> supportedScalaVersions;
18+
19+
@Pure
20+
public Boolean getOwnsBuildFiles() {
21+
return this.ownsBuildFiles;
22+
}
23+
24+
public void setOwnsBuildFiles(final Boolean ownsBuildFiles) {
25+
this.ownsBuildFiles = ownsBuildFiles;
26+
}
27+
28+
@Pure
29+
public String getClientClassesRootDir() {
30+
return this.clientClassesRootDir;
31+
}
32+
33+
public void setClientClassesRootDir(final String clientClassesRootDir) {
34+
this.clientClassesRootDir = clientClassesRootDir;
35+
}
36+
37+
@Pure
38+
public String getSemanticdbVersion() {
39+
return this.semanticdbVersion;
40+
}
41+
42+
public void setSemanticdbVersion(final String semanticdbVersion) {
43+
this.semanticdbVersion = semanticdbVersion;
44+
}
45+
46+
@Pure
47+
public List<String> getSupportedScalaVersions() {
48+
return this.supportedScalaVersions;
49+
}
50+
51+
public void setSupportedScalaVersions(final List<String> supportedScalaVersions) {
52+
this.supportedScalaVersions = supportedScalaVersions;
53+
}
54+
55+
@Override
56+
@Pure
57+
public String toString() {
58+
ToStringBuilder b = new ToStringBuilder(this);
59+
b.add("ownsBuildFiles", this.ownsBuildFiles);
60+
b.add("clientClassesRootDir", this.clientClassesRootDir);
61+
b.add("semanticdbVersion", this.semanticdbVersion);
62+
b.add("supportedScalaVersions", this.supportedScalaVersions);
63+
return b.toString();
64+
}
65+
66+
@Override
67+
@Pure
68+
public boolean equals(final Object obj) {
69+
if (this == obj)
70+
return true;
71+
if (obj == null)
72+
return false;
73+
if (getClass() != obj.getClass())
74+
return false;
75+
BloopExtraBuildParams other = (BloopExtraBuildParams) obj;
76+
if (this.ownsBuildFiles == null) {
77+
if (other.ownsBuildFiles != null)
78+
return false;
79+
} else if (!this.ownsBuildFiles.equals(other.ownsBuildFiles))
80+
return false;
81+
if (this.clientClassesRootDir == null) {
82+
if (other.clientClassesRootDir != null)
83+
return false;
84+
} else if (!this.clientClassesRootDir.equals(other.clientClassesRootDir))
85+
return false;
86+
if (this.semanticdbVersion == null) {
87+
if (other.semanticdbVersion != null)
88+
return false;
89+
} else if (!this.semanticdbVersion.equals(other.semanticdbVersion))
90+
return false;
91+
if (this.supportedScalaVersions == null) {
92+
if (other.supportedScalaVersions != null)
93+
return false;
94+
} else if (!this.supportedScalaVersions.equals(other.supportedScalaVersions))
95+
return false;
96+
return true;
97+
}
98+
99+
@Override
100+
@Pure
101+
public int hashCode() {
102+
final int prime = 31;
103+
int result = 1;
104+
result = prime * result + ((this.ownsBuildFiles== null) ? 0 : this.ownsBuildFiles.hashCode());
105+
result = prime * result + ((this.clientClassesRootDir== null) ? 0 : this.clientClassesRootDir.hashCode());
106+
result = prime * result + ((this.semanticdbVersion== null) ? 0 : this.semanticdbVersion.hashCode());
107+
return prime * result + ((this.supportedScalaVersions== null) ? 0 : this.supportedScalaVersions.hashCode());
108+
}
109+
}

bloop-rifle/src/bloop/rifle/internal/Operations.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ object Operations {
144144
case s: BloopRifleConfig.Address.DomainSocket =>
145145
val writeOutputToOpt0 =
146146
if (bloopServerSupportsFileTruncating) Some(s.outputPath)
147-
else None(Seq(s"daemon:${s.path}"), "bloop.Bloop", writeOutputToOpt0)
147+
else None
148+
149+
(Seq(s"daemon:${s.path}"), "bloop.Bloop", writeOutputToOpt0)
148150
}
149151

150152
val extraJavaOpts =

bloop-rifle/src/bloop/rifle/internal/SnailgunClient.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ class SnailgunClient(openSocket: () => Socket) extends snailgun.Client {
3939
catch {
4040
case t: SocketException =>
4141
logger.debug("Tracing an ignored socket exception...")
42-
logger.trace(t)()
42+
logger.trace(t)
4343
case t: SocketExceptionLike =>
4444
logger.debug("Tracing an ignored socket exception-like...")
45-
logger.trace(t)()
45+
logger.trace(t)
4646
}
4747
}
4848
}

0 commit comments

Comments
 (0)