today I came across. "captureStack" when analysing...
# javascript
r
today I came across. "captureStack" when analysing a thrown exception. If found this: https://github.com/JetBrains/kotlin/blob/master/js/js.translator/src/org/jetbrains/kotlin/js/translate/initializer/ClassInitializerTranslator.java#L398 but I do not know what it is about or rather why I saw this instead of the proper error. Does someone of you know when captureStack is shown instead of the regular exception?
b
Could you please provide more info? Maybe an example to reproduce?
r
It happens always with Firefox when you do a
toString
on
Throwable.stack
I think its not a problem of Kotlin but rather a Problem of Firefox
b
Could you please provide code snippet?
kotlin.Throwable
doesn’t have
stack
member
r
Throwable.asDynamic().stack
IMO it should expose stack in -js
b
I still don’t understand. What doesn’t work?
r
you don't have to investigate for me, I have a workaround for Firefox, so I am happy 🙂
b
Thank you, right now it’s clearer. Unfortunately, many things around stack trace are not standardised yet.
btw, what is the project?
r
its a tool which helps releasing maven projects via Jenkins. It analyses given projects and creates a release plan for it. A user can then see the release plan in form of a pipeline (for an example you can have a look at https://loewenfels.github.io/dep-graph-releaser/#release.json). One can make adjustments if necessary (change release-version, do not release a certain project etc.). Finally a user clicks on Start Release (in the example it is not available because the integration with Jenkins is missing, but you can click on 'Explore Release Order' to see a simulation) and the web app triggers jenkins jobs, observe them, triggers depending jobs etc. Let me know if you want to know more
I am sure it could also be integrated with TeamCity 😉 I just don't have a use case for it (yet)
b
Do use it in production?
r
yes
we release our projects like that
not all of them (not all need up-to-date dependencies) but more than 200
b
that’s a lot
r
most of them are small projects and not intertwined with each other but certain bom-poms are used almost in every project and especially in such a case (if you change something in the bom-pom) the tool is quite handy
Another nice aspect is that the dep-graph-releaser lets integrate multiple jenkins instances. We have two Jenkins instances, one is still running with 1.x and the other is running with 2.x I as a user do not even realise that jobs are triggered on multiple jenkins instances. This way we don't need to rush with the migration from Jenkins 1.x to 2.x
Let me know if you want to know more about the dep-graph-releaser
(and star the repo if you like the idea 😇)