-
Notifications
You must be signed in to change notification settings - Fork 346
KTOR-8962 Update the Create a new Ktor project tutorial #708
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
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughRemoved the Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Areas to focus on:
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
🧹 Nitpick comments (5)
codeSnippets/snippets/tutorial-server-get-started/src/test/kotlin/ApplicationTest.kt (1)
33-35: Make content-type assertion robust against charset parameters.Comparing only the subtype can pass for wrong types. Either assert both type and subtype, or match against
ContentType.Text.Html:-assertEquals("html", response.contentType()?.contentSubtype) +assertEquals("text", response.contentType()?.contentType) +assertEquals("html", response.contentType()?.contentSubtype)Alternatively:
assertTrue(response.contentType()?.match(io.ktor.http.ContentType.Text.Html) == true)topics/lib.topic (1)
372-374: Good warning; consider cross-linking.Nice addition. Add a link anchor to the detailed explanation in
server-configuration-file.topicfor consistency.topics/server-create-a-new-project.topic (3)
65-75: Alt text mismatches the artifact value.Text uses
com.example.ktor-sample, alt saysorg.example.ktor-sample. Align them to avoid confusion.
741-745: Typo: “de IDE” → “the IDE”.Fix the article.
-... added automatically by de IDE: +... added automatically by the IDE:
642-647: Grammar nit.“have the chosen the option” → “have chosen the option”.
-If you have the chosen the option to store configuration in code, +If you have chosen the option to store configuration in code,
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (17)
codeSnippets/snippets/tutorial-server-get-started/gradle/wrapper/gradle-wrapper.jaris excluded by!**/*.jarimages/ktor_project_generator_new_project_artifact_name.pngis excluded by!**/*.pngimages/ktor_project_generator_new_project_artifact_name_dark.pngis excluded by!**/*.pngimages/ktor_project_generator_new_project_configure.pngis excluded by!**/*.pngimages/ktor_project_generator_new_project_configure_dark.pngis excluded by!**/*.pngimages/ktor_project_generator_new_project_download.pngis excluded by!**/*.pngimages/ktor_project_generator_new_project_download_dark.pngis excluded by!**/*.pngimages/server_get_started_idea_gradle_run.pngis excluded by!**/*.pngimages/server_get_started_idea_gradle_run_dark.pngis excluded by!**/*.pngimages/server_get_started_idea_main_folder.pngis excluded by!**/*.pngimages/server_get_started_idea_main_folder_dark.pngis excluded by!**/*.pngimages/server_get_started_idea_project_view.pngis excluded by!**/*.pngimages/server_get_started_idea_project_view_dark.pngis excluded by!**/*.pngimages/server_get_started_idea_resources_folder.pngis excluded by!**/*.pngimages/server_get_started_idea_resources_folder_dark.pngis excluded by!**/*.pngimages/server_get_started_idea_run_terminal.pngis excluded by!**/*.pngimages/server_get_started_idea_run_terminal_dark.pngis excluded by!**/*.png
📒 Files selected for processing (29)
codeSnippets/settings.gradle.kts(0 hunks)codeSnippets/snippets/tutorial-server-get-started-maven/pom.xml(3 hunks)codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Application.kt(1 hunks)codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Routing.kt(2 hunks)codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/com/example/Application.kt(0 hunks)codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/com/example/plugins/Routing.kt(0 hunks)codeSnippets/snippets/tutorial-server-get-started-maven/src/main/resources/logback.xml(1 hunks)codeSnippets/snippets/tutorial-server-get-started-maven/src/test/kotlin/ApplicationTest.kt(1 hunks)codeSnippets/snippets/tutorial-server-get-started-maven/src/test/kotlin/com/example/ApplicationTest.kt(0 hunks)codeSnippets/snippets/tutorial-server-get-started/README.md(1 hunks)codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts(1 hunks)codeSnippets/snippets/tutorial-server-get-started/gradle.properties(1 hunks)codeSnippets/snippets/tutorial-server-get-started/gradle/libs.versions.toml(1 hunks)codeSnippets/snippets/tutorial-server-get-started/gradle/wrapper/gradle-wrapper.properties(1 hunks)codeSnippets/snippets/tutorial-server-get-started/gradlew(1 hunks)codeSnippets/snippets/tutorial-server-get-started/gradlew.bat(1 hunks)codeSnippets/snippets/tutorial-server-get-started/settings.gradle.kts(1 hunks)codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Application.kt(1 hunks)codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Routing.kt(1 hunks)codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/com/example/Application.kt(0 hunks)codeSnippets/snippets/tutorial-server-get-started/src/main/resources/application.yaml(1 hunks)codeSnippets/snippets/tutorial-server-get-started/src/main/resources/logback.xml(1 hunks)codeSnippets/snippets/tutorial-server-get-started/src/main/resources/mycontent/sample.html(1 hunks)codeSnippets/snippets/tutorial-server-get-started/src/test/kotlin/ApplicationTest.kt(1 hunks)codeSnippets/snippets/tutorial-server-get-started/src/test/kotlin/com/example/ApplicationTest.kt(0 hunks)topics/lib.topic(2 hunks)topics/maven-assembly-plugin.md(1 hunks)topics/server-configuration-file.topic(1 hunks)topics/server-create-a-new-project.topic(30 hunks)
💤 Files with no reviewable changes (6)
- codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/com/example/plugins/Routing.kt
- codeSnippets/snippets/tutorial-server-get-started-maven/src/test/kotlin/com/example/ApplicationTest.kt
- codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/com/example/Application.kt
- codeSnippets/snippets/tutorial-server-get-started/src/test/kotlin/com/example/ApplicationTest.kt
- codeSnippets/settings.gradle.kts
- codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/com/example/Application.kt
🧰 Additional context used
🧬 Code graph analysis (4)
codeSnippets/snippets/tutorial-server-get-started-maven/src/test/kotlin/ApplicationTest.kt (1)
codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Application.kt (1)
module(9-11)
codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Application.kt (1)
codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Routing.kt (1)
configureRouting(10-35)
codeSnippets/snippets/tutorial-server-get-started/src/test/kotlin/ApplicationTest.kt (1)
codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Application.kt (1)
module(9-11)
codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Application.kt (1)
codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Routing.kt (1)
configureRouting(10-35)
🔇 Additional comments (25)
codeSnippets/snippets/tutorial-server-get-started/src/main/resources/mycontent/sample.html (1)
8-12: Formatting improvement looks good.The re-indentation of the list elements improves readability and maintains consistency with standard HTML formatting conventions. No functional or content changes.
codeSnippets/snippets/tutorial-server-get-started/src/main/resources/application.yaml (1)
1-6: YAML configuration structure looks correct for EngineMain-based Ktor startup.The YAML follows proper Ktor conventions with a valid module reference and standard development port configuration.
However, verify that the module path
com.example.ApplicationKt.module(line 4) matches the actual location of theApplication.ktfile and that themodulefunction is properly defined there. Given the PR includes a transition to EngineMain-based startup, ensure this YAML configuration is correctly wired to the application's entry point.Additionally, note that the PR objectives mention adding a warning about YAML limitations in Maven projects—confirm this warning is present in the accompanying tutorial documentation.
codeSnippets/snippets/tutorial-server-get-started-maven/src/main/resources/logback.xml (1)
7-7: LGTM! Appropriate log level for tutorial.Changing the root logger level from trace to INFO reduces log verbosity and is more appropriate for a tutorial project. Trace-level logging is typically reserved for debugging purposes.
codeSnippets/snippets/tutorial-server-get-started/gradle.properties (1)
1-1: LGTM! Standard Kotlin configuration.This property configures the official Kotlin code style, which is appropriate for tutorial projects to demonstrate best practices.
codeSnippets/snippets/tutorial-server-get-started/src/main/resources/logback.xml (1)
7-7: LGTM! Consistent logging configuration.The log level change from trace to INFO is appropriate and consistent with the Maven variant of this tutorial.
codeSnippets/snippets/tutorial-server-get-started/README.md (1)
3-12: LGTM! Documentation accurately reflects standalone project structure.The changes correctly update the README to reflect that this is now a standalone project rather than a submodule of the parent Gradle build. The simplified Gradle command (
./gradlew runinstead of:tutorial-server-get-started:run) is appropriate.topics/maven-assembly-plugin.md (1)
24-31: LGTM! Documentation correctly updated.The documentation accurately explains the distinction between EngineMain and embeddedServer approaches, and the line reference update (121-144) aligns with the restructured pom.xml.
codeSnippets/snippets/tutorial-server-get-started-maven/pom.xml (3)
43-47: LGTM! StatusPages dependency added correctly.The
ktor-server-status-pages-jvmdependency is correctly added to support the StatusPages plugin used in the routing configuration.
124-124: LGTM! Maven Assembly plugin upgraded.Upgrading from version 2.6 to 3.7.1 brings the plugin to a more recent version with bug fixes and improvements.
14-15: I need to verify the latest available versions since the Maven Central query didn't parse correctly.Based on the web search results, I can now confirm that:
The latest logback version is 1.5.19 (released September 30, 2025), and version 1.5.18 exists and is referenced in release notes. Therefore, the downgrade from 1.5.18 to 1.4.14 is confirmed.
For SLF4J, the current stable and actively developed version is 2.0.17 (released February 25, 2025). The downgrade from 2.0.12 to 2.0.9 is confirmed.
From the security advisories provided in the earlier script execution, version 1.4.14 is safe from the HIGH severity serialization vulnerabilities that affect versions < 1.4.12.
However, the critical finding is that the 1.5.x series is a direct descendant of and a drop-in replacement for the 1.4.x series, which means there's no technical barrier preventing the use of the newer versions.
Confirm the intentional nature of these version downgrades and document the reason.
Both
logback_version(1.5.18 → 1.4.14) andslf4j_version(2.0.12 → 2.0.9) are confirmed downgrades to older versions. Since the latest versions (logback 1.5.19 and SLF4J 2.0.17) are available and the 1.5.x series is documented as a drop-in replacement for 1.4.x, please clarify and document the reason for reverting to these older versions (e.g., compatibility constraints, tutorials targeting specific versions, intentional reference implementations).codeSnippets/snippets/tutorial-server-get-started-maven/src/test/kotlin/ApplicationTest.kt (2)
14-23: LGTM! Root endpoint test is well-structured.The test correctly uses the
testApplicationDSL and properly verifies both the HTTP status and response body.
25-36: LGTM! HTML endpoint test has good coverage.The test properly validates the HTTP status, content type, and response body content. Good use of
assertContainsfor partial content matching.codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Routing.kt (2)
10-15: LGTM! StatusPages configuration is correct.The StatusPages plugin is properly installed with an exception handler for
IllegalStateException, demonstrating error handling for tutorial purposes.
16-34: LGTM! Routing configuration is well-structured.The routing setup demonstrates multiple use cases:
- Static resource serving
- Plain text responses
- HTML responses with explicit content type
- Error handling demonstration
All handlers are correctly implemented for tutorial purposes.
topics/server-configuration-file.topic (1)
73-75: LGTM! Important user guidance added.The warning clearly communicates the YAML configuration limitation for Maven-based projects, helping users avoid configuration issues. The placement directly under the YAML section is appropriate and consistent with the PR objectives.
codeSnippets/snippets/tutorial-server-get-started/gradlew.bat (1)
1-94: LGTM! Standard Gradle wrapper script.This is a standard Gradle-generated wrapper script for Windows with proper error handling and exit code propagation. No concerns.
codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Application.kt (1)
1-11: LGTM! Clean EngineMain-based application structure.The entry point follows Ktor best practices by delegating to
EngineMainand properly wiring the application module. The separation between the entry point and routing configuration is clean.codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Application.kt (1)
1-11: LGTM! Consistent with Maven variant.The Gradle variant maintains the same clean structure as the Maven version, which is appropriate for tutorial purposes where each variant should be self-contained and independently understandable.
codeSnippets/snippets/tutorial-server-get-started/gradle/wrapper/gradle-wrapper.properties (1)
1-7: LGTM! Secure Gradle wrapper configuration.The wrapper properties follow best practices with URL validation enabled and a reasonable network timeout. The Gradle 8.14.3 distribution is properly configured.
codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Routing.kt (1)
1-35: LGTM! Well-structured routing configuration.The routing setup demonstrates key Ktor features including:
- StatusPages plugin for error handling
- Static content serving
- Different response types (plain text and HTML)
- Error handling example
The package simplification to
com.exampleand the comment placeholder at Line 23 appear intentional for tutorial clarity.codeSnippets/snippets/tutorial-server-get-started/settings.gradle.kts (1)
1-7: LGTM! Clean settings configuration.The settings file properly establishes the project name and centralizes dependency resolution through Maven Central. This works well with the version catalog introduced in this PR.
codeSnippets/snippets/tutorial-server-get-started/gradle/libs.versions.toml (1)
1-17: Version catalog is current and well-structured.Kotlin 2.2.20 and Ktor 3.3.0 are the latest stable versions as of October 2025, confirming the dependencies are up-to-date. The version catalog properly centralizes dependency versions and follows Gradle conventions for consistent management across the tutorial project.
codeSnippets/snippets/tutorial-server-get-started/gradlew (1)
1-251: No issues found.The wrapper script is correctly committed with executable permissions (mode
100755) and the gradle-wrapper.jar file is present at the expected location alongside gradle-wrapper.properties.codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts (1)
1-4: Repositories are properly configured viadependencyResolutionManagementin settings.gradle.kts—no action required.The script output confirms that
codeSnippets/snippets/tutorial-server-get-started/settings.gradle.ktscontains thedependencyResolutionManagementblock withrepositories { mavenCentral() }configured. This file-level repository configuration is the expected pattern and resolves the concern raised.topics/server-create-a-new-project.topic (1)
984-987: The shortcuts shown in the code are correct. macOS uses Shift + Command + I (⇧⌘I), and Windows/Linux uses Ctrl + Shift + O, which matches exactly what appears in the code. No changes are required.
codeSnippets/snippets/tutorial-server-get-started-maven/pom.xml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
topics/server-create-a-new-project.topic (1)
573-574: Fix inconsistent ordering between task list and actual sections.The task list (Lines 573-574) declares the order as:
change-the-default-port(default port)change-the-port-via-yaml(port via YAML)However, the actual sections appear in reverse order:
- Line 589:
change-the-port-via-yamlsection appears first- Line 636:
change-the-default-portsection appears secondThis contradicts the guidance at Lines 581-583 that tasks should be "attempted in the order declared." Either reorder the task list links or reorder the actual sections to match.
Additionally, the section title at Line 589 ("Change the default port") is generic and doesn't indicate it's specifically about YAML/HOCON configuration, which might confuse readers expecting code-based configuration first.
Also applies to: 589-636
♻️ Duplicate comments (2)
topics/server-create-a-new-project.topic (2)
827-827: Verify keyboard shortcut for potential Cyrillic character.A past review flagged this line for potentially containing a Cyrillic "С" instead of Latin "C" in the shortcut. Please verify that the shortcut uses only Latin characters:
⌘Cmd+N(not⌘Сmd+N).The issue can be verified by copying the character and checking its Unicode value, or by searching the file for Cyrillic characters.
555-560: Correct IntelliJ IDEA capitalization in image alt text.The brand name should be "IntelliJ IDEA" with capital I and J, not "intelliJ IDEA".
Apply this diff:
- alt="intelliJ IDEA terminate icon"/>. + alt="IntelliJ IDEA terminate icon"/>. ... - alt="intelliJ IDEA rerun icon"/>. + alt="IntelliJ IDEA rerun icon"/>.
🧹 Nitpick comments (1)
codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts (1)
14-16: Consider removing inline comments for cleaner code.The comments "// Added new dependency" and "// Existing dependencies" add minimal value and can be removed for improved readability. Grouping alone makes the intent clear.
dependencies { - // Added new dependency implementation(libs.ktor.server.status.pages) - // Existing dependencies implementation(libs.ktor.server.core)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
codeSnippets/snippets/tutorial-server-get-started-maven/pom.xml(3 hunks)codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts(1 hunks)topics/lib.topic(2 hunks)topics/maven-assembly-plugin.md(1 hunks)topics/server-create-a-new-project.topic(30 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- topics/lib.topic
- topics/maven-assembly-plugin.md
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-24T08:27:00.168Z
Learnt from: vnikolova
PR: ktorio/ktor-documentation#708
File: codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts:9-11
Timestamp: 2025-10-24T08:27:00.168Z
Learning: In Ktor projects generated by the official Ktor project generator, the syntax `mainClass = "io.ktor.server.netty.EngineMain"` (direct property assignment) is the official generated format and should not be changed to `mainClass.set("...")` in build.gradle.kts files.
Applied to files:
codeSnippets/snippets/tutorial-server-get-started/build.gradle.ktscodeSnippets/snippets/tutorial-server-get-started-maven/pom.xml
🔇 Additional comments (8)
codeSnippets/snippets/tutorial-server-get-started-maven/pom.xml (3)
14-15: Clarify the rationale for version downgrades.Both
logback_versionandslf4j_versionhave been downgraded (1.5.18→1.4.14 and 2.0.12→2.0.9 respectively). Downgrades are atypical and may indicate compatibility concerns. Please confirm this is intentional and document the reason.
18-18: Main class configuration aligns with Ktor conventions.The update to
io.ktor.server.netty.EngineMainis the official generated format for Ktor projects.Based on learnings.
119-119: Verify maven-assembly-plugin 3.7.1 compatibility.The upgrade from 2.6 to 3.7.1 is a major version jump (2→3). Please verify that no breaking changes in the assembly plugin affect the build or generated artifacts, especially regarding the
jar-with-dependenciesdescriptor and manifest configuration.codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts (4)
2-3: Version catalog adoption looks good.The migration to version catalog aliases for plugins follows Gradle best practices and centralizes dependency management.
6-7: Metadata addition is appropriate.The
groupandversionproperties are correctly specified for the project.
9-10: mainClass configuration is correct.The direct property assignment syntax
mainClass = "..."aligns with the official Ktor project generator output. Based on learnings
20-20: Verify the configuration library identifier.The identifier
libs.ktor.server.config.yFamlappears suspicious—is this intended to belibs.ktor.server.config.yaml? Please confirm thatyFamlis the correct catalog entry name.topics/server-create-a-new-project.topic (1)
986-986: No issues found. The keyboard shortcut at line 986 contains only Latin characters. The 'C' in 'Cmd' is confirmed as Latin (U+0043), not Cyrillic. The original concern is unfounded.Likely an incorrect or invalid review comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (4)
topics/server-create-a-new-project.topic (4)
585-593: Align chapter title and add an explicit Maven YAML warning.
- The chapter’s title says “Change the default port” but this section is specifically about YAML/HOCON. Make it explicit to match the list entry and reduce confusion.
- Per PR objective, add a clear warning that Maven projects cannot use YAML (use HOCON instead).
- <chapter title="Change the default port" id="change-the-port-via-yaml"> + <chapter title="Change the port via YAML" id="change-the-port-via-yaml"> ... - </p> + </p> + <warning> + YAML configuration files (application.yaml) are not supported in Maven-based Ktor projects. + For Maven, use HOCON (application.conf) instead. + </warning>
511-512: Capitalize “IntelliJ IDEA” consistently in alt texts.Several alt attributes use “intelliJ” instead of “IntelliJ”. Fix for consistency and accessibility polish.
- by clicking the Gradle icon (<img alt="intelliJ IDEA gradle icon" + by clicking the Gradle icon (<img alt="IntelliJ IDEA Gradle icon" - alt="intelliJ IDEA terminate icon"/>. + alt="IntelliJ IDEA Terminate icon"/> - alt="intelliJ IDEA rerun icon"/>. + alt="IntelliJ IDEA Rerun icon"/> - <p>Click on the rerun button (<img alt="intelliJ IDEA rerun button icon" + <p>Click on the rerun button (<img alt="IntelliJ IDEA Rerun button icon" - <p>Click on the rerun button (<img alt="intelliJ IDEA rerun button icon" + <p>Click on the rerun button (<img alt="IntelliJ IDEA Rerun button icon" - <img src="server_get_started_add_new_http_endpoint.png" alt="An HTTP request file in intelliJ IDEA" + <img src="server_get_started_add_new_http_endpoint.png" alt="An HTTP request file in IntelliJ IDEA" - <p>Click on the rerun button (<img alt="intelliJ IDEA rerun button icon" + <p>Click on the rerun button (<img alt="IntelliJ IDEA Rerun button icon" - <p>Click on the rerun button (<img alt="intelliJ IDEA rerun button icon" + <p>Click on the rerun button (<img alt="IntelliJ IDEA Rerun button icon"Also applies to: 549-552, 555-557, 618-621, 680-682, 754-761, 854-856, 1024-1026
367-371: Optional: add native PowerShell alternative for extracting ZIP on Windows.Not all Windows environments have
tar. Add an “Alternatively” snippet for PowerShell’s Expand-Archive.<code-block lang="console"> tar -xf ktor-sample.zip </code-block> + <p>Alternatively (PowerShell):</p> + <code-block lang="powershell"> + Expand-Archive -Path .\ktor-sample.zip -DestinationPath . + </code-block>
719-727: Normalize code-block language capitalization.Use
lang="kotlin"consistently (lowercase) as used elsewhere in the topic.- <code-block lang="Kotlin" validate="true"> + <code-block lang="kotlin" validate="true"> ... - <code-block lang="Kotlin"> + <code-block lang="kotlin">Also applies to: 931-935
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
topics/server-create-a-new-project.topic(35 hunks)
🔇 Additional comments (1)
topics/server-create-a-new-project.topic (1)
364-366: The review comment is factually incorrect and should be disregarded.The ZIP structure from start.ktor.io contains a flat project layout (build.gradle.kts, src/, gradlew, etc. at the root), not a nested ktor-sample/ directory. Using
unzip ktor-sample.zip -d ktor-sampleis the correct approach—it extracts the flat contents into an organized ktor-sample/ folder. Removing -d would scatter files into the current directory instead.Additionally, the review claims the issue "Also applies to: 378-380," but those lines contain only the
cd ktor-samplecommand, not a second unzip command. There is only one unzip command in the file.Likely an incorrect or invalid review comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
topics/server-create-a-new-project.topic(35 hunks)
🔇 Additional comments (11)
topics/server-create-a-new-project.topic (11)
68-71: LGTM! Artifact name now consistent.The artifact name and alt text both correctly reference
com.example.ktor-sample, resolving the previous inconsistency.
174-176: LGTM! Simplified project naming.The project name is now consistently
ktor-samplethroughout the documentation, which aligns with the PR objectives.
341-378: LGTM! Consistent path updates.All references to the project name, paths, and archive names have been correctly updated to
ktor-sample.
490-495: LGTM! Settings filename corrected.The file name is now correctly shown as
settings.gradle.kts(with a dot) instead of the previously flagged hyphenated version. The snippet reference path also uses the correct filename.
577-584: LGTM! Clear task guidance.The updated text provides clearer guidance about task order and complexity, improving the tutorial flow.
712-717: LGTM! Clearer navigation instructions.The addition of an alternative navigation method (opening the
Routing.ktfile directly) provides users with multiple ways to reach the same destination, improving the tutorial's accessibility.
888-911: LGTM! Test code and imports are complete.The integration test code includes all necessary imports, including the previously flagged
contentTypeimport at line 932. The snippet reference includes line 37, which the maintainer confirmed is valid.
965-985: LGTM! Gradle configuration updated correctly.The instructions now reference the version catalog file (
gradle/libs.versions.toml) and include proper reload shortcuts that match current IDE defaults. The restructuring aligns with the PR objective to enable use of the version catalog.
990-1015: LGTM! Error handler configuration is clear.The error handler setup instructions properly reference the
Routing.ktfile and include the correct import statement. The code snippets use appropriate line ranges.
918-920: No trailing dot detected—code is correct.The verified output shows line 919 contains
<code>0.0.0.0</code>with no trailing dot after the IP address. The concern raised in the review has been verified as resolved.
822-824: No issues found — the code is correct as written.Verification confirms that the shortcut elements use only Latin characters and symbols. The "C" in both
⌘Cmd+NandCtrl+Nis the standard Latin capital C (U+0043), not the Cyrillic "С" (U+0421). No Cyrillic characters are present in lines 822–824.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice changes! 💯 I left a couple of suggestions.
Summary of my comments:
- Some of the images seem to use the old name com.example.ktor-sample-app
- Some suggestions to remove weak modal verbs like should especially where it makes it a bit difficult to understand when something might or might not happen.
- Couple of comma fix suggestions.
- Some suggestions to remove future tense where possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the changes! 🥳 — I left just one last comment otherwise LGTM 🚀
Details:
tutorial-get-startedproject fromcodeSnippetsproject to enable the use of version catalog.Related issues:
KTOR-8962
KTOR-9002