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

Sync with upstream again (2024-08) #54

Merged
merged 8 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [8, 11, 17]
java: [8, 11, 17, 21]
kubukoz marked this conversation as resolved.
Show resolved Hide resolved
os: [ubuntu-latest, windows-latest, macos-13]

runs-on: ${{ matrix.os }}
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Smithy Language Server Changelog

## 0.4.0 (2024-07-30)

### Breaking
* Upgraded JDK version to 21 ([#157](https://github.com/smithy-lang/smithy-language-server/pull/157))

### Features
* Made various performance improvements ([#146](https://github.com/smithy-lang/smithy-language-server/pull/146))
* Added support for using build-system agnostic .smithy-project.json to tell the server where project files and locally dependencies are ([#146](https://github.com/smithy-lang/smithy-language-server/pull/146))
* Added configuration option for minimum severity of validation events ([#146](https://github.com/smithy-lang/smithy-language-server/pull/146))
* Switched to smithy-syntax formatter ([#146](https://github.com/smithy-lang/smithy-language-server/pull/146))
* Added progress reporting on load ([#146](https://github.com/smithy-lang/smithy-language-server/pull/146))

### Removed/Replaced
* Removed generation of smithy.lsp.log file in favor of smithyLsp.trace.server and sending client logMessage notifications ([#146](https://github.com/smithy-lang/smithy-language-server/pull/146))
* Removed loading of every .smithy file found in all subdirectories of root path. Instead, server loads single files as separate models, or any files specified in smithy-build.json as a project ([#146](https://github.com/smithy-lang/smithy-language-server/pull/146))

### Bug fixes
* Fixed erroneously loading files in build directories, which could cause conflicting shape definitions ([#146](https://github.com/smithy-lang/smithy-language-server/pull/146))

## 0.2.4 (2024-11-08)

### Features
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0
0.4.0
98 changes: 57 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ plugins {

id "maven-publish"
id "signing"
id "io.codearte.nexus-staging" version "0.30.0"
id "com.palantir.git-version" version "0.12.3"
id "checkstyle"
id "org.jreleaser" version "1.13.0"
}


Expand Down Expand Up @@ -73,6 +73,8 @@ ext {

println "Smithy Language Server version: '${libraryVersion}'"

def stagingDirectory = rootProject.layout.buildDirectory.dir("staging")

allprojects {
apply plugin: "java"
apply plugin: "maven-publish"
Expand All @@ -89,14 +91,9 @@ repositories {

publishing {
repositories {
mavenCentral {
url = uri("https://aws.oss.sonatype.org/service/local/staging/deploy/maven2/")
if (project.hasProperty("sonatypeUser")) {
credentials {
username = project.property("sonatypeUser")
password = project.property("sonatypePassword")
}
}
maven {
name = "localStaging"
url = stagingDirectory
}
}

Expand All @@ -118,7 +115,7 @@ publishing {
pom {
name.set("Smithy Language Server")
description.set(project.description)
url.set("https://github.com/awslabs/smithy-language-server")
url.set("https://github.com/smithy-lang/smithy-language-server")
licenses {
license {
name.set("Apache License 2.0")
Expand All @@ -136,34 +133,24 @@ publishing {
}
}
scm {
url.set("https://github.com/awslabs/smithy-language-server.git")
url.set("https://github.com/smithy-lang/smithy-language-server.git")
}
}
}
}
}

// Don't sign the artifacts if we didn't get a key and password to use.
if (project.hasProperty("signingKey") && project.hasProperty("signingPassword")) {
signing {
useInMemoryPgpKeys(
(String) project.property("signingKey"),
(String) project.property("signingPassword"))
sign(publishing.publications["mavenJava"])
}
}
}


dependencies {
implementation "org.eclipse.lsp4j:org.eclipse.lsp4j:0.20.0"
implementation "org.eclipse.lsp4j:org.eclipse.lsp4j:0.23.1"
implementation "software.amazon.smithy:smithy-build:[smithyVersion, 2.0["
implementation "software.amazon.smithy:smithy-cli:[smithyVersion, 2.0["
implementation "software.amazon.smithy:smithy-model:[smithyVersion, 2.0["
implementation "software.amazon.smithy:smithy-syntax:[smithyVersion, 2.0["

testImplementation "org.junit.jupiter:junit-jupiter:5.10.0"
testImplementation "org.hamcrest:hamcrest:2.1"
testImplementation "org.hamcrest:hamcrest:2.2"

testRuntimeOnly "org.junit.platform:junit-platform-launcher"
}
Expand Down Expand Up @@ -212,8 +199,9 @@ tasks.named("checkstyleTest") {
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

jar {
Expand All @@ -227,27 +215,55 @@ jar {
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
exclude "reflect.properties"
// Included by dependencies in later versions of java, causes duplicate entries in the output jar
exclude "**/module-info.class"
}
manifest {
attributes("Main-Class": "software.amazon.smithy.lsp.Main")
}
}

/*
* Sonatype Staging Finalization
* ====================================================
*
* When publishing to Maven Central, we need to close the staging
* repository and release the artifacts after they have been
* validated. This configuration is for the root project because
* it operates at the "group" level.
*/
if (project.hasProperty("sonatypeUser") && project.hasProperty("sonatypePassword")) {
apply plugin: "io.codearte.nexus-staging"
nexusStaging {
packageGroup = "software.amazon"
stagingProfileId = "e789115b6c941"
username = project.property("sonatypeUser")
password = project.property("sonatypePassword")
jreleaser {
dryrun = false

// Used for creating a tagged release, uploading files and generating changelog.
// In the future we can set this up to push release tags to GitHub, but for now it's
// set up to do nothing.
// https://jreleaser.org/guide/latest/reference/release/index.html
release {
generic {
enabled = true
skipRelease = true
}
}

// Used to announce a release to configured announcers.
// https://jreleaser.org/guide/latest/reference/announce/index.html
announce {
active = "NEVER"
}

// Signing configuration.
// https://jreleaser.org/guide/latest/reference/signing.html
signing {
active = "ALWAYS"
armored = true
}

// Configuration for deploying to Maven Central.
// https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_gradle
deploy {
maven {
nexus2 {
"maven-central" {
active = "ALWAYS"
url = "https://aws.oss.sonatype.org/service/local"
snapshotUrl = "https://aws.oss.sonatype.org/content/repositories/snapshots"
closeRepository = true
releaseRepository = true
stagingRepository(stagingDirectory.get().toString())
}
}
}
}
}
10 changes: 5 additions & 5 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ object lsp extends MavenModule with PublishModule {
def millSourcePath: os.Path = os.pwd

def ivyDeps = Agg(
ivy"org.eclipse.lsp4j:org.eclipse.lsp4j:0.20.0",
ivy"software.amazon.smithy:smithy-build:1.46.0",
ivy"software.amazon.smithy:smithy-cli:1.46.0",
ivy"software.amazon.smithy:smithy-model:1.46.0",
ivy"software.amazon.smithy:smithy-syntax:1.46.0"
ivy"org.eclipse.lsp4j:org.eclipse.lsp4j:0.23.1",
ivy"software.amazon.smithy:smithy-build:1.50.0",
ivy"software.amazon.smithy:smithy-cli:1.50.0",
ivy"software.amazon.smithy:smithy-model:1.50.0",
ivy"software.amazon.smithy:smithy-syntax:1.50.0"
)

def publishVersion = T { gitVersion() }
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
smithyVersion=1.46.0
smithyVersion=1.50.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

package software.amazon.smithy.lsp;

import org.eclipse.lsp4j.jsonrpc.util.Preconditions;
import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
import org.eclipse.lsp4j.util.Preconditions;

public class SelectorParams {
@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
import software.amazon.smithy.lsp.document.Document;
import software.amazon.smithy.lsp.document.DocumentParser;
import software.amazon.smithy.lsp.document.DocumentShape;
import software.amazon.smithy.lsp.ext.LspLog;
import software.amazon.smithy.lsp.ext.serverstatus.OpenProject;
import software.amazon.smithy.lsp.ext.serverstatus.ServerStatus;
import software.amazon.smithy.lsp.handler.CompletionHandler;
Expand Down Expand Up @@ -197,12 +196,6 @@ public CompletableFuture<InitializeResult> initialize(InitializeParams params) {
Object initializationOptions = params.getInitializationOptions();
if (initializationOptions instanceof JsonObject) {
JsonObject jsonObject = (JsonObject) initializationOptions;
if (jsonObject.has("logToFile")) {
String setting = jsonObject.get("logToFile").getAsString();
if (setting.equals("enabled")) {
LspLog.enable();
}
}
if (jsonObject.has("diagnostics.minimumSeverity")) {
String configuredMinimumSeverity = jsonObject.get("diagnostics.minimumSeverity").getAsString();
Optional<Severity> severity = Severity.fromString(configuredMinimumSeverity);
Expand Down
137 changes: 0 additions & 137 deletions src/main/java/software/amazon/smithy/lsp/ext/LspLog.java

This file was deleted.

Loading
Loading