Skip to content

#601: fixed JavaScript handling for Java 15+ - #623

Merged
dbenn merged 4 commits into
masterfrom
601-tool---run-script-fails
Sep 14, 2026
Merged

dbenn merged 4 commits into
masterfrom
601-tool---run-script-fails

Conversation

@dbenn

@dbenn dbenn commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Running JavaScript seems to work again now, e.g. script/JavaScript/example.js

Let me know if you see any issues @mpyat2

@dbenn
dbenn requested a review from mpyat2 August 26, 2026 14:58
@dbenn dbenn self-assigned this Aug 26, 2026
@dbenn dbenn linked an issue Aug 26, 2026 that may be closed by this pull request
@dbenn dbenn added the bug Something isn't working label Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Plugin Unit Tests

All tests passed (Java 17)

Metric Value
Tests 32
Passed 32
Failures 0
Errors 0

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

VStar Unit Tests

Tests failed (Java 17)

Metric Value
Tests 1016
Passed 1015
Failures 1
Errors 0

dbenn and others added 2 commits September 5, 2026 14:11
The previous #601 commit wired these libraries into the build and docs but did not add the binaries or their license texts.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mpyat2

mpyat2 commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Hi @dbenn , in general, it works (example.js).
adopt.js works when I set existing directory, if the directory does not exist, it silently fails (no error messages).

@dbenn

dbenn commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

@mpyat2 Yes that's a very good point. Should be fixed although it's separate from the bug since it's just something the script should do, e.g. open a dialog (alert doesn't work in this context), write to a console (which there is none at the moment). There's a getError() function available to JavaScript code.

…and fixed obs sink checking (save methods had changed with obs sink intro); added more error logging at end of script run; added/fixed a couple of scripts
@dbenn

dbenn commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator Author

Hmm. I have taken a closer look at the reason for the save failure you saw @mpyat2. Please see the last commit for this. At least there will be a log entry now, e.g.

Sept 12, 2026 1:22:56 PM org.aavso.tools.vstar.scripting.ScriptRunner runScript
SEVERE: Cannot save plot to '/Users/david/Desktop/adopt-a-star/Landolt-V0348 Sgr_plot.png

More could be done and the way errors get reported depends on whether we're in scripting mode.

@mpyat2

mpyat2 commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Hi @dbenn , yes, now I can see the error in log:
Sep 14, 2026 4:47:07 PM org.aavso.tools.vstar.ui.dialog.MessageBox showErrorDialog
SEVERE: Cannot save plot to '\Users\david\Desktop\adopt-a-star\Landolt-V0348 Sgr_plot.png'.
Thank you for the improvement!

@dbenn
dbenn merged commit b373869 into master Sep 14, 2026
14 of 20 checks passed
@dbenn
dbenn deleted the 601-tool---run-script-fails branch September 14, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tool -> Run Script... fails

2 participants