Skip to content

Commit

Permalink
Debug differing paths on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
milesziemer committed Jun 12, 2024
1 parent bda5d30 commit a35f6e0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/java/software/amazon/smithy/lsp/project/ProjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
import software.amazon.smithy.lsp.TestWorkspace;
Expand Down Expand Up @@ -522,6 +523,16 @@ public void changingFileWithArrayDependenciesWithDependencies() {

String uri = workspace.getUri("model-0.smithy");
Document document = project.getDocument(uri);
if (document == null) {
String smithyFilesPaths = String.join(System.lineSeparator(), project.getSmithyFiles().keySet());
String smithyFilesUris = project.getSmithyFiles().keySet().stream()
.map(UriAdapter::toUri)
.collect(Collectors.joining(System.lineSeparator()));
Logger logger = Logger.getLogger(getClass().getName());
logger.severe("Not found uri: " + uri);
logger.severe("PATHS: " + smithyFilesPaths);
logger.severe("URIS: " + smithyFilesUris);
}
document.applyEdit(RangeAdapter.point(document.end()), "\n");

project.updateModelWithoutValidating(uri);
Expand Down

0 comments on commit a35f6e0

Please sign in to comment.