Code Monkey home page Code Monkey logo

slime's People

Contributors

davidpcaldwell avatar jamesmortensen avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

jamesmortensen

slime's Issues

Harmonize jsh.shell.shell with rhino/shell run()

Blocked on issue #59

Currently the jsh.shell.shell method has hooks to make it easier to run on Cygwin; as we disentangle Cygwin, we could delegate the call directly from jsh.shell.shell to rhino/shell run().

Add ability to build with various Java versions

Currently, the -source and -target are hard-coded to be 1.6 in the build script, and there is no cross-compilation. This regime should be more flexible; it should allow the version to be specified, and boot classpath to be specified also.

Come up with JDK version policy

Right now, inonit.script.runtime.shell.Environment supports JDK 1.4, but the launcher's implementation of searching for environment variables in api.rhino.js supports JDK 1.5.

In any case, no testing is being done with anything below 1.6 currently.

Oracle's policies are confusing enough that it's difficult to decide what to support, except perhaps 1.4+. See [[http://www.oracle.com/technetwork/java/eol-135779.html|http:~//www.oracle.com/technetwork/java/eol-135779.html]]

This would require a method for testing the software under multiple versions. It would also probably require a way of compiling with a lower -target version (and Rhino with the same?). It would not hurt to have a way of switching the Rhino version for testing as well.

See https://www.jetbrains.com/lp/devecosystem-2020/java/

Create more functional jsh.shell.java API

This issue was created by revision 937970365ac8.

Currently, the API is very minimal, but there are many other features that could be considered: launching JAR files, providing system properties, and so forth. Think them through and improve the method.

Minimize dependency on custom Java classes

Blocked on issue #30

All Java dependencies (other than the Java API and Rhino) should be reviewed and pure JS ports provided, for ease of loading heterogeneously-developed modules, facilitating reload of modules, etc. Java classes should be bundled as optimizations only.

Currently, there are some classes that may be isolated within the bundled modules (loaded from own .slime files). This could be investigated; are these available to scripts? Should they be available only to the modules?

Then there are classes that implement the interpreter embedding; these could be reviewed to ensure they are as minimal as possible.

There are also some utility classes (e.g., for I/O) in the system source root that are used by the launcher, loader, and build process. These should be examined to see whether they can be implemented using pure JS.

Remove timing conditions from running inside-Tomcat tests

The inside-Tomcat tests in jsh/test/jsh.httpd/httpd.jsh.js wait for a time interval after starting Tomcat to figure out whether they can send requests. This both wastes time if the startup takes less time and potentially causes tests to fail if it takes too long.

It would be better to read the Tomcat console output, perhaps, and use that to determine whether the server has started.

[Document] Document service provider interface for js/document

Currently the rhino/document module uses the js/document service provider interface to build documents from its Java DOM parser. But we should allow other implementations, including one based on the browser DOM. It is also currently impossible to generate XML from scratch using published APIs.

Cygwin paths helper warning message is not clear

(Affects Cygwin)

WARNING: could not locate Cygwin paths helper; could not find Cygwin native library path.
Use JSH_LIBRARY_NATIVE to specify location of Cygwin native libraries.

Does not make it clear what the consequences really are.

Transition Rhino engine to version built from source

Rhino 1.7R5 has been released, and there is one source-level patch (having to do with the negative cache for the Packages object) that would be useful to add.

Should create build-from-source option analogous to that used for ncdbg

Use more robust algorithm when searching for commands via PATHEXT

This issue was created by revision c8e6454ccb1c.

Right now, the search only finds files that have lower-case versions of PATHEXT extensions, which is surely incorrect. Should search the entire directory looking and do a case-insensitive comparison on each file to see whether it matches.

jsapi initialize blocks are not processed in order

When jsapi (and presumably browser) executes an api.html file, an initialize at the same level as a context executes even if it is after the context because there is no easy way using the pseudo-DOM to deal with ordering of these things.

See test case in jsh/test/manual/api

instanceof does not work with rhino/file Pathname

Currently, the Pathname "constructor" or function specifically sets the constructor property of Pathname objects so that instanceof works as expected. However, Pathnames created by the module (e.g., via getRelativePath()) do not work.

Merge code dealing with process environment

(Involves rhino/shell)

(Involves jsh/launcher)

(Involves jsh/loader)

Right now, something like three implementations of a search through the OS environment exist: one in the jsh launcher api.rhino.js file, and one in the rhino/shell inonit.script.runtime.shell.Environment class. Finally, the jsh loader supplies its own version of the environment in Main.java. They should be merged somehow.

Simplify packaged launcher

The Java launcher is now only used for packaged applications, so does not need to take into account the other possibilities.

In jsh, make it possible to read from standard input without echoing characters to console

This would require launching the shell in a ClassLoader rather than via a forked VM, in main.js. So a set of constraints would be placed upon the kinds of applications for which this feature would work and those for which it would not.

Given those limits, it's worth asking whether this should be done at all.

The other possibility would be finding a way for the Java child process to accurately receive the console of the parent process. Perhaps there is a way to do that.

Create Windows native launcher

There was a Cygwin launcher but it probably makes little sense at this point; should compile natively for Windows.

With JNI being dropped from the launcher, it should be relatively straightforward to use the same mechanisms being used on UNIX to locate the jsh installation and the Java executable, and launch the Java executable.

Presumably using mingw to compile would make it possible to generate a Windows executable, though the development workflow may be cumbersome to set up (cross-compiling on UNIX, sending executable to Windows for testing).

Develop a flexible native launcher application

Blocked on issue #169 (Windows)

Right now, the #! notation necessary for launching on UNIX-like systems is very cumbersome, and the command for launching a shell is similarly verbose. On top of that, for Windows users, there is very little choice for launching natively other than a long java command.

Document test scope like $jsapi

There is a whole scope created in the unit tests that provides the ability to do things like create temporary directories, etc.

Servlet plugin crashes when running stop()

Figure out why.

This causes stop() to throw an exception currently.

Feb 19, 2013 2:33:01 PM org.apache.coyote.AbstractProtocol pause  
INFO: Pausing ProtocolHandler ["http-bio-43548"]  
Feb 19, 2013 2:33:01 PM org.apache.catalina.core.StandardService stopInternal  
INFO: Stopping service Tomcat  
Feb 19, 2013 2:33:01 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc  
WARNING: JDBC driver de-registration failed for web application [/]  
java.lang.NullPointerException  
        at org.apache.catalina.loader.WebappClassLoader.clearReferencesJdbc(WebappClassLoader.java:2054)  
        at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1990)  
        at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1902)  
        at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:662)  
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)  
        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5527)  
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)  
        at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1575)  
        at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1564)  
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)  
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)  
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
        at java.lang.Thread.run(Thread.java:679)

Test case is jsh/test/manual/httpd.lifecycle.jsh.js run -stop 2000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.