can anyone pls just tell me what dependencies I sh...
# ktor
o
can anyone pls just tell me what dependencies I should have for this line:
Copy code
socket = aSocket(ActorSelectorManager(ioCoroutineDispatcher)).tcp().connect(InetSocketAddress(address,port)).tls()
d
io.ktor:ktor-network-tls:$ktor_version
Didn’t read the previous messages. Let me check
o
Copy code
dependencies {
    compile project(':commonUtils')
    compile "io.ktor:ktor-server-netty:$ktor_version"
    compile "io.ktor:ktor-network:$ktor_version"
    compile "io.ktor:ktor-network-tls:$ktor_version"
}
these are the dependencies I have currently
d
and which imports?
o
But somehow the Intellij isn't autoimporting the dendencies in the imports
Copy code
import com.github.otakusenpai.aghora.commonUtils.error.AghoraException
import io.ktor.network.selector.ActorSelectorManager
import io.ktor.network.sockets.aSocket
import io.ktor.network.sockets.openReadChannel
import io.ktor.network.sockets.openWriteChannel
import io.ktor.network.util.ioCoroutineDispatcher
import kotlinx.coroutines.experimental.async
import kotlinx.coroutines.experimental.runBlocking
import kotlinx.io.charsets.Charset
import kotlinx.io.charsets.MalformedInputException
import java.net.InetSocketAddress
import java.nio.ByteBuffer
this is the imports for my BasicConnection class
d
looks fine to me, though I would recommend to use wildcard
*
imports instead
o
I was getting these issues when i was refactoring my codebase into smaller modules
d
does it compile from command line using gradle?
o
i didn't check that
d
to determine if it is a bug related to the IDE
and have tried to close and remove the intellij project
and create it again from gradle?
o
well i remove the "core" module which contained all my code and moved the "irc" specific part to "irc" module
im building it from terminal
d
is it the project opensource? or closed source?
(so I can check)
o
its open source, but i havent pushed the recent changes yet
d
if you have the chance to push those changes into a branch, I can have a look
o
ok then
need to change the .gitignore
ok im uploading it now, its taking some time
👌 1
sorry it took so long, heres the repo: https://github.com/OtakuSenpai/AghoraBot
d
you are addding the dependencies to the root project
o
this is the file
yeah ... will that create a problem?
d
ok
no, if you are adding them to the other project too
I’m checking
Looking at the Gradle panel I found several issues. In addition to xom not being resolved because you are using single quotes and in groovy variables are not interpolated there, it seemed that you missed
maven { url "<https://dl.bintray.com/kotlin/kotlin-eap>" }
to resolve some stuff. Why? Not investigated. But in some places
kotlinx-stdlib-common:1.3.0-rc-131
is referenced and it is in that repo.
Screenshot 2018-10-08 at 19.06.02.png
Screenshot 2018-10-08 at 19.04.44.png
Screenshot 2018-10-08 at 19.04.41.png
Screenshot 2018-10-08 at 19.02.47.png
After those changes, I can’t see errors in the file you mentioned with the
aSocket
call
o
So where should i change my gradle scripts?
d
look at the screenshots, the diff is there
o
yeah checking them out
d
Copy code
allprojects.repositories {
    maven { url "<https://dl.bintray.com/kotlin/kotlin-eap>" }
}
+ change some
'
to
"
where you are using interpolated variables like
$version
o
Can I upload a Raw sockets example to kto-examples ?
d
Which one?
o
wait
d
If you have a sample that adds something that it is not there, it is welcome 🙂 you can make a PR
o
but it is for an older version
am still getting that error
nope not now
@Deactivated User should i make a pr with update to that source code ?
d
I guess that would be nicer if you embed a small IRC server along the sample so it doesn’t spam freenode or at least that tries to connect to 127.0.0.1 instead to free node so people have to change the nick/password and host, or to host a irc server locally. Still making a super simple IRC server handling the very minimum would be nice (so you can connect with a standard cient in addition to the bot) but not required. Also make sure to execute
Code -> Reformat Code
before making the PR
o
hey, sorry for the late reply i can't possibly include a simple irc server since i havent made one before. Also including a irc server for this demo could be a bit over-the-top
@Deactivated User what other simple socket demos can you think of, maybe ill write such a demo and sent a pr
d
An echo server-client. But I guess an irc client pointing to 127.0.0.1 would be enough no need for a server