Skip to content

Commit 86f6690

Browse files
authored
CSharpier server was starting on 127.0.0.1, if localhost resolved to ::1 extensions could not format (#1244)
* Use 127.0.0.1 to avoid issue when localhost resolves to ::1 references #1242 * Use 127.0.0.1 for VS extension * Use 127.0.0.1 for rider extension
1 parent 488ddab commit 86f6690

File tree

10 files changed

+17
-8
lines changed

10 files changed

+17
-8
lines changed

Src/CSharpier.Rider/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
# csharpier-rider Changelog
44

5+
## [1.7.3]
6+
- Fix issue with csharpier server not working when localhost resolved to IPv6 ::1
7+
58
## [1.7.2]
69
- Better error message when csharpier server fails to start
710

Src/CSharpier.Rider/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
pluginGroup = com.intellij.csharpier
55
pluginName = csharpier
6-
pluginVersion = 1.7.2
6+
pluginVersion = 1.7.3
77

88
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
99
# for insight into build numbers and IntelliJ Platform versions.

Src/CSharpier.Rider/src/main/java/com/intellij/csharpier/CSharpierProcessServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public FormatFileResult formatFile(FormatFileParameter parameter) {
8181
return null;
8282
}
8383

84-
var url = "http://localhost:" + this.port + "/format";
84+
var url = "http://127.0.0.1:" + this.port + "/format";
8585

8686

8787
try {

Src/CSharpier.VSCode/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## [1.7.2]
2+
- Fix issue with csharpier server not working when localhost resolved to IPv6 ::1
3+
14
## [1.7.1]
25
- Fix issue with csharpier server not supporting dotnet root
36

Src/CSharpier.VSCode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "csharpier-vscode",
33
"displayName": "CSharpier - Code formatter",
44
"description": "Code formatter using csharpier",
5-
"version": "1.7.1",
5+
"version": "1.7.2",
66
"publisher": "csharpier",
77
"author": "CSharpier",
88
"homepage": "https://marketplace.visualstudio.com/items?itemName=csharpier.csharpier-vscode",

Src/CSharpier.VSCode/src/CSharpierProcessServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class CSharpierProcessServer implements ICSharpierProcess2 {
9393
}
9494

9595
try {
96-
const url = "http://localhost:" + this.port + "/format";
96+
const url = "http://127.0.0.1:" + this.port + "/format";
9797

9898
const response = await fetch(url, {
9999
method: "POST",

Src/CSharpier.VisualStudio/CSharpier.VisualStudio/source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="83d6b6a0-9e25-4034-80f3-38445d8a8837" Version="1.7.0" Language="en-US" Publisher="CSharpier" />
4+
<Identity Id="83d6b6a0-9e25-4034-80f3-38445d8a8837" Version="1.7.1" Language="en-US" Publisher="CSharpier" />
55
<DisplayName>CSharpier</DisplayName>
66
<Description xml:space="preserve">CSharpier is an opinionated code formatter for c#. It uses Roslyn to parse your code and re-prints it using its own rules.</Description>
77
<MoreInfo>https://github.com/belav/csharpier</MoreInfo>

Src/CSharpier.VisualStudio/CSharpier.VisualStudio2019/source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="edd8b38c-baa1-46c6-b82e-1da7a0ba597b" Version="1.7.0" Language="en-US" Publisher="CSharpier" />
4+
<Identity Id="edd8b38c-baa1-46c6-b82e-1da7a0ba597b" Version="1.7.1" Language="en-US" Publisher="CSharpier" />
55
<DisplayName>CSharpier 2019</DisplayName>
66
<Description xml:space="preserve">CSharpier is an opinionated code formatter for c#. It uses Roslyn to parse your code and re-prints it using its own rules.</Description>
77
<MoreInfo>https://github.com/belav/csharpier</MoreInfo>

Src/CSharpier.VisualStudio/CSharpier.VisualStudioShared/CSharpierProcessServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public string FormatFile(string content, string filePath)
9999
return null;
100100
}
101101

102-
var url = "http://localhost:" + this.port + "/format";
102+
var url = "http://127.0.0.1:" + this.port + "/format";
103103

104104
try
105105
{

Src/CSharpier.VisualStudio/ChangeLog.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
## [1.7.0]
1+
## [1.7.1]
2+
- Fix issue with csharpier server not working when localhost resolved to IPv6 ::1
3+
4+
## [1.7.0]
25
- Use CSharpier Server for 0.28.0+
36

47
## [1.5.2]

0 commit comments

Comments
 (0)