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

kotlin scripting addon #2442

Closed
wants to merge 24 commits into from
Closed

Conversation

kcberg
Copy link
Contributor

@kcberg kcberg commented Jun 12, 2020

First pass at Kotlin scripting addOn.

I haven't worked out how to get the kotlin syntax highlighting working as it's not support by RSyntaxTextArea. The kotlin grammar is in ANTRL4 here https://github.com/Kotlin/kotlin-spec but I'm not sure the right way to convert to JFlex or if that's possible.

Any advice on how to get syntax highlighting working would be appreciated.

kberg and others added 8 commits June 12, 2020 07:17
- In wappalyzer (postInstall) and websocket (onHandshakeResponse) when
extension panels/tabs are shown ensure it's done in EDT thus preventing
the exception that was manifesting.
- Add a Fix entry to the CHANGELOGs.

Signed-off-by: kingthorin <[email protected]>
Signed-off-by: kberg <[email protected]>
ZAP complained about `appliesToHistoryType()` missing.

Signed-off-by: Anders K. Madsen <[email protected]>
Signed-off-by: kberg <[email protected]>
@kingthorin
Copy link
Member

Could you rebased or otherwise remove the commits that are included but already merged.

@kcberg
Copy link
Contributor Author

kcberg commented Jun 12, 2020

@kingthorin thanks for the review, I'll make these updates.

addOns/kotlin/CHANGELOG.md Outdated Show resolved Hide resolved
addOns/kotlin/kotlin.gradle.kts Outdated Show resolved Hide resolved
@thc202
Copy link
Member

thc202 commented Jun 12, 2020

Any advice on how to get syntax highlighting working would be appreciated.

Ideally this would be contributed upstream, there's an issue with info about using ANTLR (bobbylight/RSyntaxTextArea#221). I don't know if they would want to depend on ANTLR though, if they prefer JFlex we could take a look at converting(?). In any case we could also add it in core.

IMO the add-on should be written in Java not Kotlin, for consistency with other add-ons in this repo (e.g. Groovy add-on was written in Java not Groovy).

@kcberg
Copy link
Contributor Author

kcberg commented Jun 12, 2020

@thc202 Sure thing it's not that much code. Would you prefer I close this PR and do a new one using Java?

@thc202
Copy link
Member

thc202 commented Jun 12, 2020

It's fine in this PR (to keep the comments going), fine with other too.

kcberg and others added 12 commits June 12, 2020 19:44
Update changelog with release date and link to tag

Signed-off-by: kberg <[email protected]>
Update version and changelog.

Signed-off-by: thc202 <[email protected]>
Signed-off-by: kberg <[email protected]>
- Update version and changelog.
- Switch to semver ahead of BETA promotion.

Signed-off-by: kingthorin <[email protected]>
Signed-off-by: kberg <[email protected]>
Update to latest version, 1.4, to pick the latest features and fixes.

Signed-off-by: thc202 <[email protected]>
Signed-off-by: kberg <[email protected]>
Ensure the binary compatibility is not broken accidentally.

Signed-off-by: thc202 <[email protected]>
Signed-off-by: kberg <[email protected]>
- In wappalyzer (postInstall) and websocket (onHandshakeResponse) when
extension panels/tabs are shown ensure it's done in EDT thus preventing
the exception that was manifesting.
- Add a Fix entry to the CHANGELOGs.

Signed-off-by: kingthorin <[email protected]>
Signed-off-by: kberg <[email protected]>
ZAP complained about `appliesToHistoryType()` missing.

Signed-off-by: Anders K. Madsen <[email protected]>
Signed-off-by: kberg <[email protected]>
Signed-off-by: kberg <[email protected]>
kberg added 2 commits June 12, 2020 19:57
…lin-script

# Conflicts:
#	addOns/kotlin/kotlin.gradle.kts
#	addOns/kotlin/src/main/zapHomeFiles/scripts/templates/standalone/Standalone default template.kts
@kingthorin
Copy link
Member

If you’re having trouble removing the un-necessary commits let me know I can sort it out for you.

Signed-off-by: kberg <[email protected]>
@kcberg
Copy link
Contributor Author

kcberg commented Jun 13, 2020

If you’re having trouble removing the un-necessary commits let me know I can sort it out for you.

I'd appreciate that. Thanks!

@kingthorin
Copy link
Member

No problem, will tackle it tomorrow.

@kingthorin
Copy link
Member

kingthorin commented Jun 13, 2020

@kcberg
Copy link
Contributor Author

kcberg commented Jun 13, 2020

@kingthorin I don't have that checkbox available and it seem this is known issue with org account forks. https://github.community/t/how-can-we-enable-allow-edits-from-maintainers-by-default/2847/3

Maybe I should just do a fresh fork on my personal account and open a new PR? 🤷‍♂️

@kcberg
Copy link
Contributor Author

kcberg commented Jun 13, 2020

@kingthorin @thc202 I made a fresh fork and cleaned up the commits on my personal account and sure enough the "Allow edits by maintainers" checkbox is now available when I go to make a PR.

Here is my branch https://github.com/kcberg/zap-extensions/tree/feature/kotlin-support

Give me a thumbs up and I'll close this PR and open a new one.

Thanks for the help it's greatly appreciated!

@kingthorin
Copy link
Member

master...kcberg:feature/kotlin-support

Looks as expected to me, @kcberg please go ahead and open another PR.

@kingthorin
Copy link
Member

@kcberg kcberg closed this Jun 15, 2020
@kcberg kcberg deleted the feature/kotlin-script branch June 16, 2020 18:01
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.

4 participants