Commit Graph

5017 Commits

Author SHA1 Message Date
Jamie Doornbos 7bbd9baf28 Fixed bug where bureau registry would not destroy pending agents, exposed by curretnly broken thane client
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5075 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-10 00:58:00 +00:00
Jamie Doornbos c2a7e52626 Updated the testslib target to use Main compiler, added the actual test client code, implemented the target to run the thane test client, tweaked the tester options to run thane and go nice and slow (one operation every 3 seconds and only one instance)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5074 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-10 00:57:22 +00:00
Jamie Doornbos d502e33c7f Added new paramter for registry tester to be able to override the ant target used to launch a bureau
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5073 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-10 00:51:57 +00:00
Par Winzell 6b6a66a669 ... and back again, because apparently you can't initialize static members in, you know, static code.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5072 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-10 00:10:56 +00:00
Par Winzell 2af3ff6dc8 We can still initialize this statically, thanks Ray.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5071 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 23:35:56 +00:00
Par Winzell a3d1884340 More ugly changes because of Tamarin's immaturity. We're switching to the 'Main' frontend of ASC, which means we have to manually arrange the etc/asc-files.txt lines in the correct dependency order. This compiler also lacks an -outdir options, so we have to do a ridiculous <move> at the end.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5070 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 23:07:33 +00:00
Mike Thomas c42281ce7a Patch from Jamie to ensure GenService still finds all the array parameters for importing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5069 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 23:06:43 +00:00
Par Winzell 8ca4f9ca47 Work around a bug in Tamarin. Sorry for the ugly. Hopefully it's temporary.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5068 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 23:03:39 +00:00
Ray Greenwell 2cb6086434 Look ma, it's the last word in a small Ray-Charlie quibble. :)
I just feel like: imagine if there were no Map.containsKey().
You would instead have to get() the value and see if it's not null.
If you did that, you certainly wouldn't throw away the value if you
were going to get it again right below, would you? So why would
you do it simply because of the addition of a convenient method
called containsKey()?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5067 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 21:46:43 +00:00
Tom Conkling bf222d2d39 Properly handle StringUtil.parseInt("0", 0)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5066 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 18:58:42 +00:00
Par Winzell bf3a5599f2 I removed print(), use trace() instead.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5065 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 15:57:50 +00:00
Par Winzell 993ae240b3 ScriptCompiler croaks and dies on this, let's try Main. I think we're going to end up writing our own frontend for this compiler, these are all so broken. Witness the bizarre need to move the target file at the end here.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5064 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 15:57:05 +00:00
Par Winzell 97a09f82cb New version of Thane with System.argv support.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5063 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 15:52:43 +00:00
Par Winzell fc5a2b1b18 Add dependency on the libraries we link against.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5062 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 15:52:20 +00:00
Par Winzell 42246d96b5 Split abc compilation out into its own targets for readability.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5061 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 14:58:24 +00:00
Michael Bayne 5d544fdd55 Use Maps and Lists. Unglommed imports. Having them separated into presents and
crowd was intentional (with presents on top because it is more "generic"). We
must resist Eclipse's desire to squish our imports together into one giant,
hard to (visually) parse blob.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5060 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 11:47:38 +00:00
Jamie Doornbos f9238c8732 Dashes not allowed inside comments
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5059 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 06:58:37 +00:00
Jamie Doornbos c626095393 First stab at test code to run a thane bureau - not yet runnable
* New directory tests/src/as with port of java test client
* New build target "abclib" to create a library of the test classes specified 
  in etc/asc_files.txt
* New target to compile TestClientMain.as against testslib.abc and another to 
  run it.

(This proposes the naming convention of *Main.as for "main" thane code and 
main-*.abc for the compiled code)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5058 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 06:40:53 +00:00
Jamie Doornbos 3ccea1c218 Make naryalib.abc rebuild when file list changes
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5057 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 06:28:00 +00:00
Jamie Doornbos 10b282ce65 Added the bureau to the asc build
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5056 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 06:27:19 +00:00
Jamie Doornbos a841233609 tidied up build.xml with Zells permission, which exposed a problem with the Environment switcheroo, also fixed
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5055 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 00:03:55 +00:00
Jamie Doornbos bc35598a2e first pass at converting the bureau client to actionscript. now to find a way to run it...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5054 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 23:01:46 +00:00
Par Winzell 18d4136e3a Simplistic support for cyclic references so this method can be used without fear.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5053 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 19:45:39 +00:00
Jamie Doornbos 8eef2df364 Fixed same package removal to not also wipe out subpackages
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5052 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 19:30:55 +00:00
Jamie Doornbos c112a5c982 Regenerated narya services with new GenServiceTask, actionscript and java
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5051 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 19:17:34 +00:00
Jamie Doornbos 6ee4f8115f When generating service-related code, remove imports of classes in the same package
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5050 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 19:16:06 +00:00
Jamie Doornbos 147e849cbb adding missing license header
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5049 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 19:07:30 +00:00
Jamie Doornbos 98bb871e6d Fixed code generation for existing msoy services
* Created concept of a pattern for transforming imports rather than have some
  methods assume a suffix is provided and others assume a prefix
* Leave full array types in import set initially so that they can be dealt with 
  differently by different code exporters
* Added more primitive types and array types for action script marshallers, 
  including conversion to TypedArray
* Add listener marshaller mungings for action script marshallers' imports
* Added handling for array imports for action script services


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5048 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 19:06:32 +00:00
Ray Greenwell 45c6def0bc We need verbosity now.
Maybe I'll screw around with passing properties down to sub-projects to
control their stack trace verbosity when I'm not sick.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5047 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-07 21:51:17 +00:00
Par Winzell b528132e5d Away, spurious line feed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5046 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-07 15:39:55 +00:00
Par Winzell b174219540 We now build a subset of Narya for execution on Tamarin, the server-side AS3 VM.
- We use the ASC compiler, which works quite differently from compc/mxmlc. It doesn't attempt any mapping between class hierarchy and directory structure. You feed it source, that's it. This compiler is under continuous development, and the one shipped in Flex SDK 3 is buggy, so we supply our own in lib/asc.jar for the time being.
 - Since much of Narya relies on classes that don't exist on Tamarin (e.g. DisplayObject), we have to isolate a specific subset of source. Right now that's done ridiculously explicitly as a list of class files, in etc/asc-files.txt. In the long run we will want to resolve this more elegantly, but there are no trivial solutions at hand.
 - We have not implemented the full flash.utils.describeType() for Tamarin, but rather a subset of its functionality: one method to see if one type derives from another, and another method to extract the public variable names in an object. The environment-specific code has been isolated to com.threerings.util.env.Environment, and build.xml simply copies either Environment.as-tm or Environment.as-fp into place depending on what it's targeting.
 - The ASC compilation links against lib/builtin.abc, which supplies information about core classes such as Object, Array, etc, and lib/thane.abc which is our homegrown emulation library containing e.g. flash.net.Socket and other things we need that's not part of the open-source code Adobe donated to Mozilla, but rather still in their proprietary Flash Player code.

I'm committing thane.abc and builtin.abc directly now, but they will shortly be built by the Thane project and published as maven whatnots. We could auto-publish lib/asc.jar too, but I think we may want more explicit control over how we version that.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5045 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-07 15:33:07 +00:00
Par Winzell 4442cb7bc4 Try a different way of assessing the plainness of an object that doesn't rely on describeType(). This could potentially break games and such in somewhat non-obvious ways. I've tested a number of things locally but the next step is www.dev.whirled.com.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5044 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-07 00:34:23 +00:00
Jamie Doornbos 430b23a5bb regenerated services, notice actionscript stuff has the most changes
(I just noticed marshallers are importing themselves but the flash compiler 
doesn't seem to mind, so committing now)



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5043 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 22:54:58 +00:00
Jamie Doornbos 2ecda5b89a Forgot to check the receivers, needed to do the standard removeGlobals call
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5042 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 22:48:36 +00:00
Jamie Doornbos 61b1f23303 Narya.abc work - refactored GenServiceTask import mechanism in order to generate
clean action script files with no unnecessary imports
* New class ImportSet to facilitate the operations being performed manually
  throughout the code. Also removes the need for rawimports
* Threaded ImportSet through all places where imports and rawimports were used
  and removed magic parameters to control import generation
* Added an ImportSet instance to ServiceListener, this was key to the action 
  script fixes
* Moved all the import tweaking and munging logic into the generate* methods
  and made specific to code being generated (removed overreaching stuff
  from ServiceMethod, this was part of the problem)
* Removed blanket imports from tmpl files
* Removed unused methods
* Fixed tabs from last commit
* Quick and dirty script to check for unused imports


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5041 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 22:44:36 +00:00
Par Winzell aeafaccd66 I think this depencency on Stage is obsolete now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5040 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 19:45:47 +00:00
Par Winzell 971ec75567 Some manual unused-import removal. I think one or two of these might need further Jamie lovin' but I want to get ABC compilation running.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5039 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 17:12:42 +00:00
Par Winzell 15c16a40b6 Running genreceiver and genservice with Jamie's spiffed-up generators.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5038 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 17:03:54 +00:00
Par Winzell 5924aac198 Running genreceiver and genservice with Jamie's spiffed-up generators.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5037 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 16:59:04 +00:00
Jamie Doornbos bf501313f1 Narya.abc work - get rid of unused imports in generated service targets:
* ServiceMethod import options:
  - Made argument type imports ignore first N args (0 for old behavior)
  - Made marshaller listener imports optional
* Added InvocationTask._verbose and several dumps of current imports to help 
  track down future superfluous imports
* Made the import of ServiceListener method arguments' types optional
* Wrapped up most of processService code into protected inner class 
  ServiceDescription and made configurable:
  - Optional import of the types of the first arguments of the service methods
  - Optinoal import of the types of listener method arguments
* Changed generate methods to take the service class and construct their own
  local ServiceDescription configured for their target
* Removed global import of service class and do it explicitly where required
  (via method addServiceImport)
* Made some imports conditional
  - InvocationResponseEvent for mashallers only if service has some listeners
  - InvocationException for providers only if service has some methods with 
    listener arguments
* Removed unused variables and imports


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5036 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-05 22:53:31 +00:00
Charlie Groves c4af1d257c Add dependency on google-collect for the bureaucracy
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5035 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-05 21:10:11 +00:00
Par Winzell 5cae3fb3a3 This is no longer useful to us.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5034 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-01 00:00:27 +00:00
Jamie Doornbos 3d65f679e8 Fixed I/O in BureauRegistry and removed synchronization
* Keep an Invoker member
* Added internal Launcher class to run ProcessBuilder.start on the invoker 
  thread because it is blocking
* Removed synchronized from methods, all ooo-servers are single threaded, 
  hurray!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5033 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-30 18:27:45 +00:00
Jamie Doornbos e74035a05c Bureaucracy smoke test and resulting bug fixes
* Added RegistryTester smoke test which randomly creates and destroys agents 
  in batches
* Fixed bug where correct agent id was never making it to client
* Implemented Bureau.toString (+refactored summarize method)
* Fixed nasty bug due to my assumption that SafeSubscriber =~ Subscriber, they 
  are in fact completely different


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5032 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-30 17:55:40 +00:00
Jamie Doornbos 490b5b9764 Bureaucracy: Fixed my TODO about using google's Maps and Sets utils
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5031 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-29 19:02:13 +00:00
Jamie Doornbos f41233c5ac Bureaucracy review updates and hello world test
* Fleshed out client-side Agent class, made abstract
* Delegate the creation of the bureau director to subclasses of BureauClient
* Moved BureauDirector's BureauReceiver and Subscriber implementations to 
  anonymous classes that delegate to protected methods.
* Use SafeSubscriber
* Added new service method for notiyfing the server when the creation of an
  agent fails so that the registry is not perpetually waiting
* Made BureauCredentials more conformant
* Made BureauRegistry respond properly to client logging off
* Got rid of superfluous uses of safeToString
* Changed Launcher to CommandGenerator and now use ProcessBuilder and 
  copyMergedOutput
* Changed bureau process parameters to server name and port instead of URL


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5030 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-29 18:34:51 +00:00
Charlie Groves 938d7f5994 Share a single MethodFinder between all instances of a subclass of PlaceManager as they can be large enough constitute the bulk of a PlaceManager
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5029 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-29 18:07:04 +00:00
Tom Conkling f6e95780f5 created KeyboardCodes. Most of these constants are mysteriously missing from flash.ui.Keyboard, where they're supposed to be.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5028 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-29 00:58:39 +00:00
Jamie Doornbos 74dac11f97 Bureaucracy
* Fixed signature of Receiver methods
* Implemented create/destroy mechanism and bootstrap request in BureauDirector
* Added BureauContext class to expose bureau information on top of usual 
  presents stuff
* Added BureauContext implementation in BureauClient
* Added code to kick off the director when the client logs on
* Added credentials for a bureau logon, which is just a token passed to 
  command line launcher
* Added concept of bureau types to distinguish between executable and command 
  line arguments; includes interface BureauRegistry.Launcher
* Implemented backend for the registry


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5027 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-28 18:34:57 +00:00
Jamie Doornbos b10cc3643d Removed @Override on interface methods.
the deployment build must be using stricter options (need to find them so I can replicate these issues locally in the future)

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5026 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-25 20:39:51 +00:00