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

Router DSL #151

Closed
wants to merge 4 commits into from
Closed

Conversation

Tim-Britton
Copy link
Contributor

@Tim-Britton Tim-Britton commented Aug 30, 2019

Hello All,

This pull request includes the Router DSL that I am working on. See #91

Any feedback is welcome!

Tim

@Tim-Britton
Copy link
Contributor Author

@vietj As far as testing the DSL how would you like that to be done?

I would normally use mockk to perform the testing but I'm not sure if its okay to add a new dependency to the project.

@okou19900722
Copy link
Contributor

Directory src/main/kotlin will be removed by the clean task,

<execution>
<id>default-clean</id>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}/src/main/kotlin</directory>
</fileset>
</filesets>
</configuration>
</execution>

So it is recommended to move the code to the src/main/java directory.



fun main() {
val vertx = Vertx.vertx()
Copy link
Contributor

Choose a reason for hiding this comment

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

can we have example with no coroutine as well ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added an example with no coroutines! Also added an example with the route builder because that was one piece of the dsl that I wanted feedback on.

Also another thing I was thinking about was the DslServer and DslRouter are also a coroutine scope is that going to be a problem?

@Tim-Britton
Copy link
Contributor Author

Directory src/main/kotlin will be removed by the clean task,

<execution>
<id>default-clean</id>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}/src/main/kotlin</directory>
</fileset>
</filesets>
</configuration>
</execution>

So it is recommended to move the code to the src/main/java directory.
@okou19900722

Maybe I'm not understanding but all the source files for this project are in src/man/kotlin am I messing something?

I've included what I'm seeing in intellij below:

image

@okou19900722
Copy link
Contributor

@Tim-Britton have you check the src/main/java yet?
the extension function is generated to src/main/kotlin by vertx-codegen, so sometimes, If you execute mvn clean, directory src/main/kotlin will be removed

@tsegismont
Copy link
Contributor

Superseded by #253

@tsegismont tsegismont closed this Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants