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

TodoMVC kotlin ktor #3651

Merged
merged 9 commits into from
Oct 5, 2024
Merged

Conversation

javimartinez
Copy link
Contributor

@javimartinez javimartinez commented Oct 2, 2024

Part of #3611

@javimartinez javimartinez changed the title Todomvp kotlin ktor TodoMVC kotlin ktor Oct 2, 2024
@javimartinez javimartinez marked this pull request as draft October 2, 2024 22:12

> curl http://localhost:8080
...<h1>todos</h1>...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be fixed by de-denting all the lines in the usage block. The parser handling these is pretty fragile and doesn't tolerate extraneous whitespace

@lihaoyi
Copy link
Member

lihaoyi commented Oct 3, 2024

I'm seeing http://localhost:8080/learn.json 404 Not Found in the web console, and the terminal logs have a similar error. Is something misconfigured?

[2582] [53] 2024-10-03 11:47:13.187 [eventLoopGroupProxy-4-1] TRACE io.ktor.routing.Routing - Trace for [webjars, todomvc-common, base.js]
[2582] [53] /, segment:0 -> SUCCESS @ /
[2582] [53]   /, segment:0 -> SUCCESS @ /
[2582] [53]     /(method:GET), segment:0 -> FAILURE "Not all segments matched" @ /(method:GET)
[2582] [53]   /active, segment:0 -> FAILURE "Selector didn't match" @ /active
[2582] [53]   /completed, segment:0 -> FAILURE "Selector didn't match" @ /completed
[2582] [53]   /save, segment:0 -> FAILURE "Selector didn't match" @ /save
[2582] [53]   /{id}, segment:1 -> SUCCESS; Parameters [id=[webjars]] @ /{id}
[2582] [53]     /{id}/delete, segment:1 -> FAILURE "Selector didn't match" @ /{id}/delete
[2582] [53]     /{id}/toggle, segment:1 -> FAILURE "Selector didn't match" @ /{id}/toggle
[2582] [53]   /toggle-all, segment:0 -> FAILURE "Selector didn't match" @ /toggle-all
[2582] [53] Matched routes:
[2582] [53]   No results
[2582] [53] Route resolve result:
[2582] [53]   FAILURE "No matched subtrees found" @ /
[2582] [53] 2024-10-03 11:47:13.187 [eventLoopGroupProxy-4-2] TRACE io.ktor.routing.Routing - Trace for [webjars, todomvc-common, base.css]
[2582] [53] /, segment:0 -> SUCCESS @ /
[2582] [53]   /, segment:0 -> SUCCESS @ /
[2582] [53]     /(method:GET), segment:0 -> FAILURE "Not all segments matched" @ /(method:GET)
[2582] [53]   /active, segment:0 -> FAILURE "Selector didn't match" @ /active
[2582] [53]   /completed, segment:0 -> FAILURE "Selector didn't match" @ /completed
[2582] [53]   /save, segment:0 -> FAILURE "Selector didn't match" @ /save
[2582] [53]   /{id}, segment:1 -> SUCCESS; Parameters [id=[webjars]] @ /{id}
[2582] [53]     /{id}/delete, segment:1 -> FAILURE "Selector didn't match" @ /{id}/delete
[2582] [53]     /{id}/toggle, segment:1 -> FAILURE "Selector didn't match" @ /{id}/toggle
[2582] [53]   /toggle-all, segment:0 -> FAILURE "Selector didn't match" @ /toggle-all
[2582] [53] Matched routes:
[2582] [53]   No results
[2582] [53] Route resolve result:
[2582] [53]   FAILURE "No matched subtrees found" @ /
[2582] [53] 2024-10-03 11:47:13.188 [eventLoopGroupProxy-4-3] TRACE io.ktor.routing.Routing - Trace for [webjars, todomvc-app-css, index.css]
[2582] [53] /, segment:0 -> SUCCESS @ /
[2582] [53]   /, segment:0 -> SUCCESS @ /
[2582] [53]     /(method:GET), segment:0 -> FAILURE "Not all segments matched" @ /(method:GET)
[2582] [53]   /active, segment:0 -> FAILURE "Selector didn't match" @ /active
[2582] [53]   /completed, segment:0 -> FAILURE "Selector didn't match" @ /completed
[2582] [53]   /save, segment:0 -> FAILURE "Selector didn't match" @ /save
[2582] [53]   /{id}, segment:1 -> SUCCESS; Parameters [id=[webjars]] @ /{id}
[2582] [53]     /{id}/delete, segment:1 -> FAILURE "Selector didn't match" @ /{id}/delete
[2582] [53]     /{id}/toggle, segment:1 -> FAILURE "Selector didn't match" @ /{id}/toggle
[2582] [53]   /toggle-all, segment:0 -> FAILURE "Selector didn't match" @ /toggle-all
[2582] [53] Matched routes:
[2582] [53]   No results
[2582] [53] Route resolve result:
[2582] [53]   FAILURE "No matched subtrees found" @ /
[2582] [53] 2024-10-03 11:47:13.191 [eventLoopGroupProxy-4-3] TRACE io.ktor.routing.Routing - Trace for [learn.json]
[2582] [53] /, segment:0 -> SUCCESS @ /
[2582] [53]   /, segment:0 -> SUCCESS @ /
[2582] [53]     /(method:GET), segment:0 -> FAILURE "Not all segments matched" @ /(method:GET)
[2582] [53]   /active, segment:0 -> FAILURE "Selector didn't match" @ /active
[2582] [53]   /completed, segment:0 -> FAILURE "Selector didn't match" @ /completed
[2582] [53]   /save, segment:0 -> FAILURE "Selector didn't match" @ /save
[2582] [53]   /{id}, segment:1 -> SUCCESS; Parameters [id=[learn.json]] @ /{id}
[2582] [53]     /{id}/delete, segment:1 -> FAILURE "Selector didn't match" @ /{id}/delete
[2582] [53]     /{id}/toggle, segment:1 -> FAILURE "Selector didn't match" @ /{id}/toggle
[2582] [53]   /toggle-all, segment:0 -> FAILURE "Selector didn't match" @ /toggle-all
[2582] [53] Matched routes:
[2582] [53]   No results
[2582] [53] Route resolve result:
[2582] [53]   FAILURE "No matched subtrees found" @ /

@lihaoyi
Copy link
Member

lihaoyi commented Oct 4, 2024

As part of this PR, can you update 1-hello-ktor to use 8090 as its port, and 2-todo-ktor to user 8091. We currently don't have automatic port assignment set up, so we have to manually assign different ports to each integration test to avoid conflict when running in parallel

@lihaoyi
Copy link
Member

lihaoyi commented Oct 4, 2024

One behavioral bug I found: when there are tasks stored, we should never hide the bottom All/Active/Completed bar, even if none of the tasks would be displayed in the current configuration. The bar should only be hidden when all tasks are deleted, not when they are hidden by filters

@javimartinez
Copy link
Contributor Author

Thanks for the review @lihaoyi. I'll take a look to these comments over the weekend :)

@lihaoyi
Copy link
Member

lihaoyi commented Oct 5, 2024

Looks great, @javimartinez if you're done with it I'll merge once tests pass

@javimartinez javimartinez marked this pull request as ready for review October 5, 2024 09:28
@javimartinez
Copy link
Contributor Author

Looks great, @javimartinez if you're done with it I'll merge once tests pass

Yeah, I'm done :)

@lihaoyi lihaoyi merged commit d0cc6f8 into com-lihaoyi:main Oct 5, 2024
24 checks passed
@lihaoyi
Copy link
Member

lihaoyi commented Oct 5, 2024

Great! Email me your bank transfer details and I can send you the bounty

@lefou lefou modified the milestones: 0.13.0, 0.12.0 Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants