Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 736 lines (672 sloc) 23.403 kb
de587e3 Andrew Whitworth Use instead of 'using extern', as per Winxed deprecation. dukeleto++ fo...
authored
1 $loadlib "io_ops";
a2b3b87 Andrew Whitworth forward declare for OS, to suppress warnings
authored
2 class OS;
2fbba7d Andrew Whitworth Rename the bootstrapping file so that it isn't interferred with by the b...
authored
3
98c343b Andrew Whitworth Add top-level error handling and backtrace printing to setup.winxed, for...
authored
4 function setup_main(var argv)
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
5 {
8884066 Andrew Whitworth Add in a prototype winxed wrapper for distutils so I can build winxed li...
authored
6 setup_distutils();
d4cd396 Andrew Whitworth add a version of the core library written in winxed. Expand the setup.wi...
authored
7 var rosella = {
3aa3589 Andrew Whitworth fix setup so we can cut an sdist release
authored
8 "name" : 'Rosella',
9 "abstract" : 'Utilities Library for Parrot',
10 "authority" : 'http://github.com/Whiteknight',
11 "copyright_holder" : 'Andrew Whitworth',
12 "keywords" : ["test", "tap", "xunit", "event", "container", "dependency injection"],
13 "license_type" : 'Artistic License 2.0',
14 "license_uri" : 'http://www.perlfoundation.org/artistic_license_2_0',
15 "checkout_uri" : 'git://github.com/Whiteknight/rosella.git',
16 "browser_uri" : 'git://github.com/Whiteknight/rosella',
17 "project_uri" : 'git://github.com/Whiteknight/rosella',
18 "pir_nqp-rx" : {},
19 "pir_winxed" : {},
20 "pbc_pbc" : {},
21 "pbc_pir" : {},
22 "pir_pir" : {},
e036fbf Andrew Whitworth Add 'winxed_debug' arg to Distutils wrapper to build winxed files with -...
authored
23 "winxed_debug" : false,
a8d979a Andrew Whitworth pbc_merge doesn't keep annotations, so cut it out of the build. concat w...
authored
24 "winxed_winxed" : {},
3aa3589 Andrew Whitworth fix setup so we can cut an sdist release
authored
25 "inst_lib" : [],
f2571a9 Andrew Whitworth add infrastructure to build and install utility/driver programs, such as...
authored
26 "installable_pbc" : {},
a3c9e13 Andrew Whitworth update setup.winxed to build include files with libraries. Factor out th...
authored
27 "include_winxed" : {},
f517965 Andrew Whitworth update README to include information about the release. Make sure the wi...
authored
28 "manifest_includes" : ["CREDITS", "README.md", "setup.winxed"]
8884066 Andrew Whitworth Add in a prototype winxed wrapper for distutils so I can build winxed li...
authored
29 };
30
f517965 Andrew Whitworth update README to include information about the release. Make sure the wi...
authored
31 setup_release(rosella);
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
32 setup_stable_libraries(rosella);
33 setup_experimental_libraries(rosella);
f2571a9 Andrew Whitworth add infrastructure to build and install utility/driver programs, such as...
authored
34 setup_utilities(rosella);
ceceef4 Andrew Whitworth Make sure template files get installed to a shared data location. Add a ...
authored
35 setup_data_files(rosella);
67899c4 Andrew Whitworth Add an inst_wxheader install step to add winxed header files to the inst...
authored
36 setup_include_headers(rosella);
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
37
3aa3589 Andrew Whitworth fix setup so we can cut an sdist release
authored
38 get_all_tests(rosella, "t");
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
39 argv.shift();
3f9fc31 Andrew Whitworth winxed_setup now only sets up the stages for winxed, it doesn't call dis...
authored
40 setup(argv, rosella);
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
41 }
42
f517965 Andrew Whitworth update README to include information about the release. Make sure the wi...
authored
43 function setup_release(var rosella)
44 {
baab31d Andrew Whitworth Don't compile setup.winxed to setup.pir anymore. Parrot ships with winxe...
authored
45 //rosella["pir_winxed"]["setup.pir"] = "setup.winxed";
46 //rosella["manifest_includes"].push("setup.pir");
f517965 Andrew Whitworth update README to include information about the release. Make sure the wi...
authored
47 }
48
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
49 function setup_stable_libraries(var rosella)
50 {
a2679db Andrew Whitworth move the setup.winxed file to the root directory. Update it so that it i...
authored
51 // A distutils wrapper library which adds winxed functionality.
52 // A bootstrapped version is included in the repo because we need it
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
53 // to run setup.winxed (this script). This is the only rosella library
54 // which doesn't rely on Core.
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
55 setup_winxed_lib(rosella, "winxed", [],
cdd3270 Andrew Whitworth Break repl out into a new library. the Winxed library can't have depende...
authored
56 "winxed/Distutils"
f4e6bf9 Andrew Whitworth Add REPL functionality to the winxed library. Add in a quick driver prog...
authored
57 );
a2679db Andrew Whitworth move the setup.winxed file to the root directory. Update it so that it i...
authored
58
59 // The Rosella "core" library. Does very little on its own but is
60 // required by other libraries in the sequence
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
61 setup_winxed_lib(rosella, "core", [],
f6d5cf8 Andrew Whitworth [Builtins] Add new builtins to create some common datastructures. Use th...
authored
62 "core/Includes",
bbfee1b Andrew Whitworth move the .winxed files into the same directory as the .nqp files. Clean ...
authored
63 "core/Rosella",
c8f8bcd Andrew Whitworth Simplify ObjectFactory. Move it from container to core. Add in a .winxed...
authored
64 "core/Error",
f6d5cf8 Andrew Whitworth [Builtins] Add new builtins to create some common datastructures. Use th...
authored
65 "core/Hash",
0111611 Andrew Whitworth Add some experimental higher-order functions to the core library. Inspir...
authored
66 "core/Function",
5d3f14c Andrew Whitworth move swap_handles routine from Test.TestFile to new Rosella.IO namespace...
authored
67 "core/IO",
5e50a09 Andrew Whitworth Add a new IteratorBase to help with the tedium of making iterators. Add ...
authored
68 "core/IteratorBase",
967f0ba Andrew Whitworth Add an ability to register library-globals. Use this to register an OS P...
authored
69 "core/Globals",
7832c28 Andrew Whitworth Add in utilities for managing and retrieving version numbers to core. Se...
authored
70 "core/ObjectFactory",
e1ba9b0 Andrew Whitworth setup.winxed builds a code file for setting up version numbers.
authored
71 "core/Version",
d4ab49c Andrew Whitworth Move String.Converter to core StringFormatter so we can make the functio...
authored
72 "core/StringFormatter",
5c36917 Andrew Whitworth [Net] Several fixes so a simpel ad hoc test of file:// urls works
authored
73 "core/Parrot",
b330f75 Andrew Whitworth fix build. Add comments to version
authored
74 "_build/_versions"
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
75 );
d4cd396 Andrew Whitworth add a version of the core library written in winxed. Expand the setup.wi...
authored
76
a2679db Andrew Whitworth move the setup.winxed file to the root directory. Update it so that it i...
authored
77 // The action library. Allows creating Action/Command objects for
78 // delayed evaluation.
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
79 setup_winxed_lib(rosella, "action", ["Core"],
d4cd396 Andrew Whitworth add a version of the core library written in winxed. Expand the setup.wi...
authored
80 "action/Action",
d5e22de Andrew Whitworth move subclasses of Action into their own files
authored
81 "action/action/Sub",
82 "action/action/Method",
70ae34e Andrew Whitworth break subclasses of Action::Argument into their own files. ContainerReso...
authored
83 "action/Argument",
84 "action/argument/Instance"
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
85 );
d4cd396 Andrew Whitworth add a version of the core library written in winxed. Expand the setup.wi...
authored
86
a2679db Andrew Whitworth move the setup.winxed file to the root directory. Update it so that it i...
authored
87 // Dependency Injection / Inversion of Control container library
3a68299 Andrew Whitworth Initial rewrite of Container library
authored
88 setup_winxed_lib(rosella, "container", ["Core"],
d4cd396 Andrew Whitworth add a version of the core library written in winxed. Expand the setup.wi...
authored
89 "container/Container",
3a68299 Andrew Whitworth Initial rewrite of Container library
authored
90 "container/Argument",
c5d13cc Andrew Whitworth Add in a set of lifetime managers. The lifetime managers allow us to reu...
authored
91 "container/LifetimeManager",
3a68299 Andrew Whitworth Initial rewrite of Container library
authored
92 "container/Option",
ef01076 Andrew Whitworth Add in a prototype for a light-weight service locator type to Container
authored
93 "container/Resolver",
94 "container/ServiceLocator"
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
95 );
d4cd396 Andrew Whitworth add a version of the core library written in winxed. Expand the setup.wi...
authored
96
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
97 // A proxying library for building and managing proxies
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
98 setup_winxed_lib(rosella, "proxy", ["Core"],
74cfd90 Andrew Whitworth remove the old .nqp files from the proxy library. Replace with new .winx...
authored
99 "proxy/Builder",
100 "proxy/Controller",
101 "proxy/Factory",
102 "proxy/Proxy",
debb3fc Andrew Whitworth Redo the memoizer cache system. Add in a proxy-based memoization solutio...
authored
103 "proxy/builder/Array",
74cfd90 Andrew Whitworth remove the old .nqp files from the proxy library. Replace with new .winx...
authored
104 "proxy/builder/AttributeIntercept",
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
105 "proxy/builder/Imitate",
debb3fc Andrew Whitworth Redo the memoizer cache system. Add in a proxy-based memoization solutio...
authored
106 "proxy/builder/Immutable",
4e98e6b Andrew Whitworth Start fleshing out proxy builders for Array and Hash types
authored
107 "proxy/builder/InvokeIntercept",
debb3fc Andrew Whitworth Redo the memoizer cache system. Add in a proxy-based memoization solutio...
authored
108 "proxy/builder/MethodIntercept",
7a4244c Andrew Whitworth add an Immutable proxy builder. cleanup and streamline the decorator bui...
authored
109 "proxy/builder/Passthrough",
debb3fc Andrew Whitworth Redo the memoizer cache system. Add in a proxy-based memoization solutio...
authored
110 "proxy/builder/PMCKeyedHash",
111 "proxy/builder/ProxyData",
112 "proxy/builder/StringKeyedHash"
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
113 );
74cfd90 Andrew Whitworth remove the old .nqp files from the proxy library. Replace with new .winx...
authored
114
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
115 // A testing library for writing and running unit tests.
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
116 setup_winxed_lib(rosella, "test", ["Core"],
a865bb5 Andrew Whitworth finish initial (untested) translation of xunit library to winxed. Merge ...
authored
117 "test/Builder",
bd15f88 Andrew Whitworth fixes so test asserter starts building
authored
118 "test/Asserter",
a865bb5 Andrew Whitworth finish initial (untested) translation of xunit library to winxed. Merge ...
authored
119 "test/Failure",
120 "test/Listener",
121 "test/Listener/TAP",
3704e3f Andrew Whitworth Add in a basic matcher functionality for the Test library, so we can do ...
authored
122 "test/Matcher",
123 "test/matcher/Factory",
a865bb5 Andrew Whitworth finish initial (untested) translation of xunit library to winxed. Merge ...
authored
124 "test/Result",
125 "test/Suite",
16e85fc Andrew Whitworth small fix to get the library to build
authored
126 "test/SuiteFactory",
2279a25 Andrew Whitworth Add a new test_list function to Test, for testing objects which contain ...
authored
127 "test/suitefactory/List",
4a74382 Andrew Whitworth Add functionality for vectorized tests. bubaflub++ for the idea/motivati...
authored
128 "test/suitefactory/Vector",
91cec9e Andrew Whitworth fix tests to use the new syntax
authored
129 "test/Test",
16e85fc Andrew Whitworth small fix to get the library to build
authored
130 "test/TestCase",
131 "test/TestContext",
b8b9607 Andrew Whitworth Break important bits of TestContext out into TestStatus. TestContext can...
authored
132 "test/TestFactory",
133 "test/TestStatus"
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
134 );
d4cd396 Andrew Whitworth add a version of the core library written in winxed. Expand the setup.wi...
authored
135
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
136 // A mock object library for advanced unit testing
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
137 setup_winxed_lib(rosella, "mockobject", ["Core", "Test", "Proxy"],
6995493 Andrew Whitworth whatever
authored
138 "mockobject/MockObject",
7353a67 Andrew Whitworth flesh out the new mockobject library. All the logic *looks* like it's th...
authored
139 "mockobject/Controller",
5352fcd Andrew Whitworth start refactor of tap_harness. Refactor MockObject.Controller and subcla...
authored
140 "mockobject/controller/Ordered",
7353a67 Andrew Whitworth flesh out the new mockobject library. All the logic *looks* like it's th...
authored
141 "mockobject/Expectation",
6a387e9 Andrew Whitworth Break expectations out into type-based subclasses, instead of trying to ...
authored
142 "mockobject/expectation/Get",
143 "mockobject/expectation/Set",
144 "mockobject/expectation/Method",
145 "mockobject/expectation/Invoke",
92fec0b Andrew Whitworth Break with/will logic out of Expectation into proper subclasses so we ca...
authored
146 "mockobject/expectation/Will",
147 "mockobject/expectation/With",
7353a67 Andrew Whitworth flesh out the new mockobject library. All the logic *looks* like it's th...
authored
148 "mockobject/Factory"
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
149 );
7353a67 Andrew Whitworth flesh out the new mockobject library. All the logic *looks* like it's th...
authored
150
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
151 // A tap harness library for building easy, extensible test harnesses
7629e1a Andrew Whitworth Start using Container in the implementation of Harness
authored
152 setup_winxed_lib(rosella, "harness", ["Core", "FileSystem", "Query", "String", "Container"],
7d88708 Andrew Whitworth rename src/tap_harness to src/harness to reflect the new name of the lib...
authored
153 "harness/Harness",
4e73dab Andrew Whitworth Several fixes so we build
authored
154 "harness/FileResult",
155 "harness/TapParser",
156 "harness/TestExecutor",
7d88708 Andrew Whitworth rename src/tap_harness to src/harness to reflect the new name of the lib...
authored
157 "harness/TestFile",
cf9342a Andrew Whitworth Add in an Automatic testfile type that reads the shebang line to determi...
authored
158 "harness/testfile/Automatic",
7d88708 Andrew Whitworth rename src/tap_harness to src/harness to reflect the new name of the lib...
authored
159 "harness/testfile/Factory",
160 "harness/testfile/NQP",
161 "harness/testfile/PIR",
162 "harness/testfile/Winxed",
163 "harness/TestRun",
164 "harness/testrun/Factory",
165 "harness/View"
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
166 );
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
167
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
168 // Event library. Subscribe to, receive, and publish event notifications.
4dd20ee Andrew Whitworth Event doesn't rely on Action anymore
authored
169 setup_winxed_lib(rosella, "event", ["Core"],
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
170 "event/Event",
acd78bf Andrew Whitworth Start fleshing out new Event library, to try and take advantage of green...
authored
171 "event/Dispatcher",
172 "event/dispatcher/Factory",
7c59170 Andrew Whitworth First stab at Event library refactor. Break subscriber management out in...
authored
173 "event/Manager",
3930fb8 Andrew Whitworth Break out a new Payload type from Event. This is necessary to decouple t...
authored
174 "event/Payload",
acd78bf Andrew Whitworth Start fleshing out new Event library, to try and take advantage of green...
authored
175 "event/Subscriber",
176 "event/subscriber/Factory"
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
177 );
60f76ae Andrew Whitworth Memoize is now stable
authored
178
179 // Memoization library. Allows multiple types of transparent Sub
180 // memoization.
181 setup_winxed_lib(rosella, "memoize", ["Core", "Proxy"],
182 "memoize/Memoize",
183 "memoize/Cache",
184 "memoize/cache/Item",
185 "memoize/cache/SimpleString",
186 "memoize/Controller",
187 "memoize/Factory"
188 );
c5c8c3c Andrew Whitworth Query is now a stable library.
authored
189
190 // A library for working with aggregates
7d8585d Andrew Whitworth Move the knuth-fisher-yates shuffle implementation to the Random library...
authored
191 setup_winxed_lib(rosella, "query", ["Core", "Random"],
cc0f081 Andrew Whitworth Start updating the Query library to use inlines
authored
192 "query/Includes",
193 "query/Query",
c5c8c3c Andrew Whitworth Query is now a stable library.
authored
194 "query/Provider",
195 "query/provider/Array",
196 "query/provider/Hash",
197 "query/provider/Scalar",
6fe6cd6 Andrew Whitworth refactor provider selection logic into a Factory class. Make a global de...
authored
198 "query/provider/Factory",
c5c8c3c Andrew Whitworth Query is now a stable library.
authored
199 "query/Queryable",
360c3f6 Andrew Whitworth Break the Iterable stuff up into separate files for better organization
authored
200 "query/Iterable",
d62d4c2 Andrew Whitworth Several fixes and cleanups to iterable. Add in a factory type for source...
authored
201 "query/iterable/Factory",
360c3f6 Andrew Whitworth Break the Iterable stuff up into separate files for better organization
authored
202 "query/iterable/KeyValuePair",
203 "query/iterable/Sources",
14a8a39 Andrew Whitworth Rough hewn version of what the new query library will look like.
authored
204 "query/iterable/Iterators",
205 "query/Sort",
206 "query/sort/Timsort"
c5c8c3c Andrew Whitworth Query is now a stable library.
authored
207 );
fc2c635 Andrew Whitworth FileSystem library is now stable
authored
208
42996df Andrew Whitworth Path library is now stable
authored
209 // A library for working with files and directories
6988bd2 Andrew Whitworth FileSystem.File.*_time() methods return a Date object instead of a raw s...
authored
210 setup_winxed_lib(rosella, "filesystem", ["Core", "Math_Builtins", "Date"],
4d922ca Andrew Whitworth move include_const declarations, where necessary, into 'header' files to...
authored
211 "filesystem/Includes",
907f46d Andrew Whitworth [FileSystem] Rename FilePath to Path. Factor it out so Directories can u...
authored
212 "filesystem/FileSystem",
fc2c635 Andrew Whitworth FileSystem library is now stable
authored
213 "filesystem/Entry",
214 "filesystem/Directory",
5e50a09 Andrew Whitworth Add a new IteratorBase to help with the tedium of making iterators. Add ...
authored
215 "filesystem/DirectoryIterator",
fc2c635 Andrew Whitworth FileSystem library is now stable
authored
216 "filesystem/File",
fcadbb5 Andrew Whitworth Add in a new FileSystem.FileIterator tto iterate over a steam line by li...
authored
217 "filesystem/FileIterator",
611d6ad Andrew Whitworth Start moving the harness towards using an Stream for TAP input. Requires...
authored
218 "filesystem/IterableHandle",
907f46d Andrew Whitworth [FileSystem] Rename FilePath to Path. Factor it out so Directories can u...
authored
219 "filesystem/Path",
fc2c635 Andrew Whitworth FileSystem library is now stable
authored
220 "filesystem/Visitor",
221 "filesystem/visitor/Delete",
222 "filesystem/visitor/Function",
223 "filesystem/visitor/List",
224 ["filesystem/Constants"]:[named("constants")]
225 );
42996df Andrew Whitworth Path library is now stable
authored
226
227 // Search for values in nested aggregates
228 setup_winxed_lib(rosella, "path", ["Core"],
229 "path/Path",
230 "path/Searcher",
231 "path/searcher/Hash",
232 "path/searcher/Attribute"
233 );
f078d32 Andrew Whitworth String is now stable
authored
234
235 // String handling and tokenizing library
236 setup_winxed_lib(rosella, "string", ["Core"],
237 "string/Includes",
238 "string/String",
d4ab49c Andrew Whitworth Move String.Converter to core StringFormatter so we can make the functio...
authored
239 "string/FormatPrinter",
f078d32 Andrew Whitworth String is now stable
authored
240 "string/Tokenizer",
241 "string/tokenizer/CClass",
242 "string/tokenizer/Delimiter",
243 "string/tokenizer/DelimiterRegion",
856b944 Andrew Whitworth Add in a new Tokenizer.Iterator for String. Add a few other enhancements...
authored
244 "string/tokenizer/Iterator",
29fad38 Andrew Whitworth [String] Add a SimpleCode tokenizer, which performs lexing of simple cod...
authored
245 "string/tokenizer/SimpleCode",
d6c703c Andrew Whitworth [String] Add in an experimental new Trie type
authored
246 "string/tokenizer/Token",
247 "string/Trie"
f078d32 Andrew Whitworth String is now stable
authored
248 );
81a09c1 Andrew Whitworth make template not unstable anymore. Add and fix sevral tests for templat...
authored
249
6345a20 Andrew Whitworth CommandLine is stable
authored
250 // Templating and formatting text
81a09c1 Andrew Whitworth make template not unstable anymore. Add and fix sevral tests for templat...
authored
251 setup_winxed_lib(rosella, "template", ["Core", "Path", "String", "FileSystem"],
252 "template/Includes",
253 "template/Template",
254 "template/Engine",
255 "template/Context",
256 "template/Handler",
257 "template/handler/Factory",
258 "template/handler/For",
259 "template/handler/Repeat",
260 "template/handler/If",
261 "template/handler/Include",
262 "template/handler/Set",
263 "template/Node",
264 "template/node/Factory",
265 "template/node/Master",
266 "template/node/Logic",
267 "template/node/Data",
268 "template/node/Eval",
269 "template/node/Literal"
270 );
3777857 Andrew Whitworth Add the random library back in, I don't know how it got deleted
authored
271
272 // Random number generation and tools
389c66c Andrew Whitworth [Parse] Add a new Parse library, to hold some common parsing-related rou...
authored
273 setup_winxed_lib(rosella, "random", ["String", "Math_Builtins"],
3777857 Andrew Whitworth Add the random library back in, I don't know how it got deleted
authored
274 "random/Includes",
275 "random/Random",
276 "random/RandomNumber",
277 "random/randomnumber/BoxMullerNormal",
983058f Andrew Whitworth Add in a quick generator for version 4 UUIDs
authored
278 "random/randomnumber/MersenneTwister",
4ec1141 Andrew Whitworth Flesh out some UUID-related utilities. UUIDs are going to be immutable, ...
authored
279 "random/UUID",
280 "random/uuid/Version4"
3777857 Andrew Whitworth Add the random library back in, I don't know how it got deleted
authored
281 );
6345a20 Andrew Whitworth CommandLine is stable
authored
282
283 // Working with commandline arguments
284 setup_winxed_lib(rosella, "commandline", ["Core", "String"],
285 "commandline/Arguments",
286 "commandline/Program",
287 "commandline/ProgramMode"
288 );
f84af18 Andrew Whitworth Dumper is version 1.
authored
289
d92e819 Andrew Whitworth date is stable now. Update setup.winxed and VERSION
authored
290 // Library for debug-style data dumping
f84af18 Andrew Whitworth Dumper is version 1.
authored
291 setup_winxed_lib(rosella, "dumper", ["Core"],
292 "dumper/Dumper",
293 "dumper/DumpHandler",
294 "dumper/Emitter",
295 "dumper/dumphandler/Array",
296 "dumper/dumphandler/Hash",
297 "dumper/dumphandler/InspectAttrs",
298 "dumper/dumphandler/Object",
f195f79 Andrew Whitworth Add in a Dumper.Handle type which is like a FileHandle but dumps the val...
authored
299 "dumper/dumphandler/Null",
300 "dumper/Handle"
f84af18 Andrew Whitworth Dumper is version 1.
authored
301 );
d92e819 Andrew Whitworth date is stable now. Update setup.winxed and VERSION
authored
302
303 // Library for working with date and time
230397d Andrew Whitworth [Date] Add in a second implementation of DateFormatter logic using Parse...
authored
304 setup_winxed_lib(rosella, "date", ["Core", "Ascii", "Parse_builtins", "Parse"],
d92e819 Andrew Whitworth date is stable now. Update setup.winxed and VERSION
authored
305 "date/Includes",
306 "date/Date",
307 "date/DateFormatter",
308 "date/Doomsday",
e9d3385 Andrew Whitworth [Date] Add TimeSpan to the build and add in some helpers.
authored
309 "date/SpecialDate",
310 "date/TimeSpan",
311 "date/TimeSpanFormatter"
d92e819 Andrew Whitworth date is stable now. Update setup.winxed and VERSION
authored
312 );
4a117d6 Andrew Whitworth Reflect is now stable. Update build script and test harness.
authored
313
314 // Library for reflection and introspection
9b98817 Andrew Whitworth Fix reflect build, and fix a method call
authored
315 setup_winxed_lib(rosella, "reflect", ["Core"],
4a117d6 Andrew Whitworth Reflect is now stable. Update build script and test harness.
authored
316 "reflect/Includes",
317 "reflect/Reflect",
318 "reflect/Class",
319 "reflect/class/Member",
320 "reflect/class/Attribute",
321 "reflect/class/Method",
74612ad Andrew Whitworth [Reflect] Add Deserializer to the build, fixes so it builds and runs
authored
322 "reflect/Deserializer",
ff14008 Andrew Whitworth [Reflect] Add in some new classes to start deep opcode-level introspecti...
authored
323 "reflect/Function",
324 "reflect/Instruction",
325 "reflect/Module",
326 "reflect/OpArg"
4a117d6 Andrew Whitworth Reflect is now stable. Update build script and test harness.
authored
327 );
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
328 }
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
329
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
330 function setup_experimental_libraries(var rosella)
331 {
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
332 // A prototype library for managing a prototype-based object system
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
333 setup_unstable_lib(rosella, "prototype", ["Core"],
73289fc Andrew Whitworth Cleanups for Prototype. Get back closer to the implementation that NotFo...
authored
334 "prototype/Object",
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
335 "prototype/Manager",
9e2db22 Andrew Whitworth rearrange some stuff in the prototype library. I honestly have no idea w...
authored
336 "prototype/manager/Entry",
337 "prototype/manager/ObjectCloner"
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
338 );
339
340 // A library for creating and using cheap, transparent decorator
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
341 setup_unstable_lib(rosella, "decorate", ["Core", "Proxy"],
139f2e3 Andrew Whitworth add in a new decorator library. A decorator is a transparent pass-throug...
authored
342 "decorate/Builder",
7f61f41 Andrew Whitworth Add in an alternate method for making decorators. Inheriting from Rosell...
authored
343 "decorate/Decorator",
139f2e3 Andrew Whitworth add in a new decorator library. A decorator is a transparent pass-throug...
authored
344 "decorate/Factory"
345 );
346
2e30dc5 Andrew Whitworth Rename Contract library to Assert
authored
347 setup_unstable_lib(rosella, "assert", ["Core"],
348 "assert/Assert",
349 "assert/Debug",
350 "assert/Method",
351 "assert/Interface"
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
352 );
0fe13a0 Andrew Whitworth fix Assert compilation error, and add it back into the build
authored
353
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
354 setup_unstable_lib(rosella, "lazy", ["Core", "Proxy"],
25c805a Andrew Whitworth first draft of a new Lazy library. Allows creating lazy proxies, which o...
authored
355 "lazy/Lazy",
356 "lazy/Builder",
357 "lazy/Controller",
358 "lazy/Factory"
359 );
c5c98ce Andrew Whitworth fix setup script for merge
authored
360
a01fa2f Andrew Whitworth Convert most raw pirops to inline/builtins
authored
361 setup_unstable_lib(rosella, "benchmark", ["Core", "Math_Builtins"],
4570030 Andrew Whitworth update Benchmark library to be more useful. Update the few benchmarks we...
authored
362 "benchmark/Benchmark",
363 "benchmark/Result"
364 );
6451e61 Andrew Whitworth Add Template library to the build. Fixes so things build
authored
365
cdd3270 Andrew Whitworth Break repl out into a new library. the Winxed library can't have depende...
authored
366 setup_unstable_lib(rosella, "repl", ["Core"],
367 "repl/Repl",
368 "repl/Commands",
369 "repl/CommandFuncs",
370 "repl/Compiler",
371 "repl/State",
372 "repl/View"
373 );
12dc30d Andrew Whitworth Add Genetic to the build. Several fixes to make it build
authored
374
375 setup_unstable_lib(rosella, "genetic", ["Core", "Query", "Random"],
376 "genetic/Cell",
0608be1 Andrew Whitworth Several refactors for genetic.
authored
377 "genetic/Context",
12dc30d Andrew Whitworth Add Genetic to the build. Several fixes to make it build
authored
378 "genetic/Engine",
379 "genetic/Mutator",
0608be1 Andrew Whitworth Several refactors for genetic.
authored
380 "genetic/mutator/Generic"
12dc30d Andrew Whitworth Add Genetic to the build. Several fixes to make it build
authored
381 );
382f1d6 Andrew Whitworth [Net] Add Net to the build and fix errors and warnings. Add more request...
authored
382
389c66c Andrew Whitworth [Parse] Add a new Parse library, to hold some common parsing-related rou...
authored
383 setup_unstable_lib(rosella, "net", ["Core", "Math_Builtins", "Ascii", "Parse_builtins", "Parse", "String", "FileSystem", "Date", "Random"],
382f1d6 Andrew Whitworth [Net] Add Net to the build and fix errors and warnings. Add more request...
authored
384 "net/Includes",
5c36917 Andrew Whitworth [Net] Several fixes so a simpel ad hoc test of file:// urls works
authored
385 "net/Net",
382f1d6 Andrew Whitworth [Net] Add Net to the build and fix errors and warnings. Add more request...
authored
386 "net/Http",
3d22fcb Andrew Whitworth [Net] Rewrite Request and Response. They don't share a common subtype an...
authored
387 "net/RequestResponse",
63fb8df Andrew Whitworth [Net] Refactor SocketFactory to be more general. It can create all sorts...
authored
388 "net/http/Header",
389 "net/http/Request",
390 "net/http/Response",
382f1d6 Andrew Whitworth [Net] Add Net to the build and fix errors and warnings. Add more request...
authored
391 "net/MimeBase64",
5c36917 Andrew Whitworth [Net] Several fixes so a simpel ad hoc test of file:// urls works
authored
392 "net/Protocol",
3607d2e Andrew Whitworth [Net] Break the protocol classes out into separate files. Misc cleanups
authored
393 "net/protocol/Factory",
394 "net/protocol/File",
395 "net/protocol/Http",
382f1d6 Andrew Whitworth [Net] Add Net to the build and fix errors and warnings. Add more request...
authored
396 "net/Uri",
c10062c Andrew Whitworth [Net] Break uri up into subtypes since parsing is so different and we wa...
authored
397 "net/uri/Factory",
398 "net/uri/File",
399 "net/uri/Http",
382f1d6 Andrew Whitworth [Net] Add Net to the build and fix errors and warnings. Add more request...
authored
400 "net/UserAgent",
7be362c Andrew Whitworth [Net] Update the request protocols to send status information back to a ...
authored
401 "net/useragent/SimpleHttp",
63fb8df Andrew Whitworth [Net] Refactor SocketFactory to be more general. It can create all sorts...
authored
402 "net/SocketFactory"
382f1d6 Andrew Whitworth [Net] Add Net to the build and fix errors and warnings. Add more request...
authored
403 );
6535ea8 Andrew Whitworth [Xml] Add in a new stub xml parsing library. I said I wasn't going to wr...
authored
404
389c66c Andrew Whitworth [Parse] Add a new Parse library, to hold some common parsing-related rou...
authored
405 setup_unstable_lib(rosella, "parse", ["Core", "Ascii", "Parse_builtins"],
406 "parse/Parse"
407 );
408
409 setup_unstable_lib(rosella, "xml", ["Core", "Ascii", "Parse_builtins", "Parse", "String", "FileSystem"],
6535ea8 Andrew Whitworth [Xml] Add in a new stub xml parsing library. I said I wasn't going to wr...
authored
410 "xml/Includes",
411 "xml/Xml",
412 "xml/Document",
f68937d Andrew Whitworth [Xml] Break parsing out into a new file. Fix a bug where not having whit...
authored
413 "xml/Parser",
6535ea8 Andrew Whitworth [Xml] Add in a new stub xml parsing library. I said I wasn't going to wr...
authored
414 "xml/Tag",
415 "xml/Text"
416 );
3bd0219 Andrew Whitworth [Json] Add in a new hand-rolled recursive descent parsing library for JS...
authored
417
389c66c Andrew Whitworth [Parse] Add a new Parse library, to hold some common parsing-related rou...
authored
418 setup_unstable_lib(rosella, "json", ["Core", "Ascii", "Parse_builtins", "Parse", "Dumper"],
3bd0219 Andrew Whitworth [Json] Add in a new hand-rolled recursive descent parsing library for JS...
authored
419 "json/Includes",
783b0cb Andrew Whitworth [Json] Create a subclass of Dumper to serialize arbitrary objects to jso...
authored
420 "json/Json",
421 "json/Dumper",
b43ea6c Andrew Whitworth [Json] Move parsing code into a separate file/namespace. Add position in...
authored
422 "json/DumpHandler",
423 "json/Parser"
3bd0219 Andrew Whitworth [Json] Add in a new hand-rolled recursive descent parsing library for JS...
authored
424 );
d4cd396 Andrew Whitworth add a version of the core library written in winxed. Expand the setup.wi...
authored
425 }
426
f2571a9 Andrew Whitworth add infrastructure to build and install utility/driver programs, such as...
authored
427 function setup_utilities(var rosella)
428 {
af49ba8 Andrew Whitworth Add several utilities to the build and install
authored
429 var utilities = {
a552eda Andrew Whitworth Cleanup the utilities portion of setup.winxed a little
authored
430 "winxed_repl" : {
431 "install_name" : "winxed_repl",
432 "includes" : ["Core", "Repl"]
433 },
434 "test_all_lib" : {
435 "install_name" : "rosella_test_all_lib",
436 "includes" : ["Core", "FileSystem", "String", "Template", "CommandLine", "Query", "Reflect"]
437 },
438 "test_template" : {
439 "install_name" : "rosella_test_template",
440 "includes" : ["Core", "FileSystem", "Template", "CommandLine", "Query", "Reflect"]
441 },
442 "mk_winxed_header" : {
443 "install_name" : "winxed_mk_header",
444 "includes" : ["Core", "FileSystem", "CommandLine", "Query", "Reflect"]
445 },
446 "harness" : {
447 "install_name" : "rosella_harness",
448 "includes" : ["Core", "Harness"]
449 },
450 "parrot_release" : {
451 "install_name" : "parrot_release",
452 "includes" : ["Core", "FileSystem", "Template", "String", "Query", "Date"]
e7f999f Andrew Whitworth [Template] Add in a stub utility for compiling templates
authored
453 },
454 "templatecc" : {
455 "install_name" : "rosella_templatecc",
456 "includes" : ["Core", "CommandLine", "Template"]
a552eda Andrew Whitworth Cleanup the utilities portion of setup.winxed a little
authored
457 }
af49ba8 Andrew Whitworth Add several utilities to the build and install
authored
458 };
769de5f Andrew Whitworth Add in a few more auto-generated include files. Change the way we built ...
authored
459 string src_prefix = "src/utilities/";
460 string dest_prefix = "rosella/";
f2571a9 Andrew Whitworth add infrastructure to build and install utility/driver programs, such as...
authored
461 for (string util_source in utilities) {
769de5f Andrew Whitworth Add in a few more auto-generated include files. Change the way we built ...
authored
462 string src_file = src_prefix + util_source + ".winxed";
a552eda Andrew Whitworth Cleanup the utilities portion of setup.winxed a little
authored
463 string dest_file_base = string(utilities[util_source]["install_name"]);
769de5f Andrew Whitworth Add in a few more auto-generated include files. Change the way we built ...
authored
464 string winxed_file = dest_prefix + dest_file_base + ".winxed";
465 string pir_file = dest_prefix + dest_file_base + ".pir";
466 string pbc_file = dest_prefix + dest_file_base + ".pbc";
f2571a9 Andrew Whitworth add infrastructure to build and install utility/driver programs, such as...
authored
467
cdd3270 Andrew Whitworth Break repl out into a new library. the Winxed library can't have depende...
authored
468 var files = ["src/include/Builtins.winxed"];
a552eda Andrew Whitworth Cleanup the utilities portion of setup.winxed a little
authored
469 var includes = utilities[util_source]["includes"];
769de5f Andrew Whitworth Add in a few more auto-generated include files. Change the way we built ...
authored
470 for (string include in includes)
471 push(files, "src/include/" + include + ".winxed");
472 push(files, src_file);
473
474 rosella["winxed_winxed"][winxed_file] = files;
f2571a9 Andrew Whitworth add infrastructure to build and install utility/driver programs, such as...
authored
475 rosella["pir_winxed"][pir_file] = winxed_file;
476 rosella["pbc_pir"][pbc_file] = pir_file;
769de5f Andrew Whitworth Add in a few more auto-generated include files. Change the way we built ...
authored
477 rosella["installable_pbc"][dest_file_base] = pbc_file;
f2571a9 Andrew Whitworth add infrastructure to build and install utility/driver programs, such as...
authored
478 }
479 }
480
ceceef4 Andrew Whitworth Make sure template files get installed to a shared data location. Add a ...
authored
481 function setup_data_files(var rosella)
482 {
483 rosella["inst_data"] = [
67bc8e8 Andrew Whitworth fix the names of installed template files
authored
484 "rosella/data/templates/test_class.nqp.template",
485 "rosella/data/templates/test_class.winxed.template",
486 "rosella/data/templates/test_ns.winxed.template",
ceceef4 Andrew Whitworth Make sure template files get installed to a shared data location. Add a ...
authored
487 "rosella/data/templates/test_harness.nqp.template",
5b63ae4 Andrew Whitworth Add in a new parrot_release utility that will help to automate the relea...
authored
488 "rosella/data/templates/test_harness.winxed.template",
489 "rosella/data/templates/release_directions.template",
e086158 Andrew Whitworth add in three new templates for creating parrot release announcements (ev...
authored
490 "rosella/data/templates/release.json.template",
491 "rosella/data/templates/release_announce.txt.template",
492 "rosella/data/templates/release_announce.html.template",
493 "rosella/data/templates/release_announce.md.template"
ceceef4 Andrew Whitworth Make sure template files get installed to a shared data location. Add a ...
authored
494 ];
495 }
496
67899c4 Andrew Whitworth Add an inst_wxheader install step to add winxed header files to the inst...
authored
497 function setup_include_headers(var rosella)
498 {
499 rosella["inst_wxheader"] = {
45f985a Andrew Whitworth cleanups
authored
500 "src/include/Action.winxed" : "Rosella/Action.winxed",
5e816f0 Andrew Whitworth [Builtins] Add a new Ascii.winxed include file with inlines for working ...
authored
501 "src/include/Ascii.winxed" : "Rosella/Ascii.winxed",
45f985a Andrew Whitworth cleanups
authored
502 "src/include/Builtins.winxed" : "Rosella/Builtins.winxed",
503 "src/include/CommandLine.winxed" : "Rosella/CommandLine.winxed",
485a25e Andrew Whitworth Add include files for the rest of the stable libs.
authored
504 "src/include/Container.winxed" : "Rosella/Container.winxed",
45f985a Andrew Whitworth cleanups
authored
505 "src/include/Core.winxed" : "Rosella/Core.winxed",
485a25e Andrew Whitworth Add include files for the rest of the stable libs.
authored
506 "src/include/Dumper.winxed" : "Rosella/Dumper.winxed",
507 "src/include/Event.winxed" : "Rosella/Event.winxed",
45f985a Andrew Whitworth cleanups
authored
508 "src/include/FileSystem.winxed" : "Rosella/FileSystem.winxed",
17a8978 Andrew Whitworth Several fixes to the Genetic classes so that we can pass some basic adho...
authored
509 "src/include/Genetic.winxed" : "Rosella/Genetic.winxed",
45f985a Andrew Whitworth cleanups
authored
510 "src/include/Harness.winxed" : "Rosella/Harness.winxed",
67899c4 Andrew Whitworth Add an inst_wxheader install step to add winxed header files to the inst...
authored
511 "src/include/Math_Builtins.winxed" : "Rosella/Math_Builtins.winxed",
485a25e Andrew Whitworth Add include files for the rest of the stable libs.
authored
512 "src/include/Memoize.winxed" : "Rosella/Memoize.winxed",
513 "src/include/MockObject.winxed" : "Rosella/MockObject.winxed",
b9f2783 Andrew Whitworth [Xml] Re-write the Xml parser using the same lookahead technique as I us...
authored
514 "src/include/Parsing.winxed" : "Rosella/Parsing.winxed",
45f985a Andrew Whitworth cleanups
authored
515 "src/include/Proxy.winxed" : "Rosella/Proxy.winxed",
516 "src/include/Path.winxed" : "Rosella/Path.winxed",
517 "src/include/Query.winxed" : "Rosella/Query.winxed",
518 "src/include/Random.winxed" : "Rosella/Random.winxed",
519 "src/include/Repl.winxed" : "Rosella/Repl.winxed",
520 "src/include/String.winxed" : "Rosella/String.winxed",
521 "src/include/Template.winxed" : "Rosella/Template.winxed",
522 "src/include/Test.winxed" : "Rosella/Test.winxed"
67899c4 Andrew Whitworth Add an inst_wxheader install step to add winxed header files to the inst...
authored
523 };
524 }
525
a3c9e13 Andrew Whitworth update setup.winxed to build include files with libraries. Factor out th...
authored
526 function setup_winxed_lib(var rosella, string name, var includes, var files [slurpy],
527 var named [slurpy,named])
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
528 {
a3c9e13 Andrew Whitworth update setup.winxed to build include files with libraries. Factor out th...
authored
529 setup_lib_internal(rosella, name, "src/", includes, files, named);
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
530 }
531
a3c9e13 Andrew Whitworth update setup.winxed to build include files with libraries. Factor out th...
authored
532 function setup_unstable_lib(var rosella, string name, var includes, var files [slurpy],
533 var named [slurpy,named])
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
534 {
a3c9e13 Andrew Whitworth update setup.winxed to build include files with libraries. Factor out th...
authored
535 setup_lib_internal(rosella, name, "src/unstable/", includes, files, named);
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
536 }
537
538 function setup_lib_internal(var rosella, string name, string prefix,
a3c9e13 Andrew Whitworth update setup.winxed to build include files with libraries. Factor out th...
authored
539 var includes, var files_raw, var named)
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
540 {
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
541 var pir_files = [];
a3c9e13 Andrew Whitworth update setup.winxed to build include files with libraries. Factor out th...
authored
542 setup_lib_constants(rosella, name, prefix, named);
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
543
544 // Get a list of all files
bf8d347 Andrew Whitworth Move builtins to a separate file that all libraries have use of
authored
545 var files = ["src/include/Builtins.winxed"];
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
546 for (string include in includes)
a8d979a Andrew Whitworth pbc_merge doesn't keep annotations, so cut it out of the build. concat w...
authored
547 push(files, "src/include/" + include + ".winxed");
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
548 for (string file in files_raw)
a8d979a Andrew Whitworth pbc_merge doesn't keep annotations, so cut it out of the build. concat w...
authored
549 push(files, prefix + file + ".winxed");
7469240 Andrew Whitworth move unstable libraries into an unstable folder. Update setup.winxed to ...
authored
550
a8d979a Andrew Whitworth pbc_merge doesn't keep annotations, so cut it out of the build. concat w...
authored
551 string winxed_master = "rosella/" + name + ".winxed";
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
552 string pbc_lib_name = "rosella/" + name + ".pbc";
553 string pir_lib_name = "rosella/" + name + ".pir";
a8d979a Andrew Whitworth pbc_merge doesn't keep annotations, so cut it out of the build. concat w...
authored
554 rosella["winxed_winxed"][winxed_master] = files;
555 rosella["pir_winxed"][pir_lib_name] = winxed_master;
556 rosella["pbc_pir"][pbc_lib_name] = pir_lib_name;
24c335b Andrew Whitworth Add in a new invoke intercept builder. With this we can now proxy Sub an...
authored
557 rosella["inst_lib"].push(pbc_lib_name);
3aa3589 Andrew Whitworth fix setup so we can cut an sdist release
authored
558 rosella["manifest_includes"].push(pir_lib_name);
8884066 Andrew Whitworth Add in a prototype winxed wrapper for distutils so I can build winxed li...
authored
559 }
560
a3c9e13 Andrew Whitworth update setup.winxed to build include files with libraries. Factor out th...
authored
561 function setup_lib_constants(var rosella, string name, string prefix, var args)
562 {
563 var constants_files = args["constants"];
564 if (constants_files == null || elements(constants_files) == 0)
565 return;
566 for (string constant_file in constants_files) {
567 string pasm_file = sprintf("%s%s.pasm", [prefix, constant_file]);
568 string winxed_file = sprintf("%s%s.winxed", [prefix, constant_file]);
569 rosella["include_winxed"][pasm_file] = winxed_file;
570 }
571 }
572
573
574
288bddf Andrew Whitworth +docs and style changes
authored
575 // Load in the distutils library, which we are also responsible for
576 // building. If we don't have a version handy, load in the bootstrapping
577 // version. If we do have one built, use that instead
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
578 function setup_distutils()
579 {
092461d Andrew Whitworth Don't bootstrap, until I can figure out the problems with it
authored
580 #int e = 0;
581 #string distutils = "rosella/winxed.pbc";
582 #${ stat e, distutils, 0 };
583 #if (e)
584 # load_bytecode(distutils);
585 #else {
586 # say("Bootstrapping build with existing distutils library");
a6da2d6 Andrew Whitworth use some proper namespacing for the distutils routines. Update bootstrap
authored
587 load_bytecode("src/winxed/Distutils.bootstrap.pir");
092461d Andrew Whitworth Don't bootstrap, until I can figure out the problems with it
authored
588 #}
3f9fc31 Andrew Whitworth winxed_setup now only sets up the stages for winxed, it doesn't call dis...
authored
589
a6da2d6 Andrew Whitworth use some proper namespacing for the distutils routines. Update bootstrap
authored
590 using Rosella.Winxed.Distutils.winxed_setup;
3f9fc31 Andrew Whitworth winxed_setup now only sets up the stages for winxed, it doesn't call dis...
authored
591 winxed_setup();
adeb72f Andrew Whitworth version information is now stored in Rosella.Version objects.
authored
592 using register_step_before;
593 using build_version_file;
594 using clean_version_file;
595 register_step_before("build", build_version_file);
596 register_step_before("clean", clean_version_file);
8884066 Andrew Whitworth Add in a prototype winxed wrapper for distutils so I can build winxed li...
authored
597 }
598
7bb9390 Andrew Whitworth Add in an experimental new contracts library, which is going to allow so...
authored
599 // TODO: "build" first, before we test.
600 function do_test()
601 {
a2679db Andrew Whitworth move the setup.winxed file to the root directory. Update it so that it i...
authored
602 using get_nqp;
603 string nqp = "parrot-nqp"; //get_nqp();
604 string cmd = nqp + " t/harness";
8884066 Andrew Whitworth Add in a prototype winxed wrapper for distutils so I can build winxed li...
authored
605 int result;
606 ${ spawnw result, cmd };
acd78bf Andrew Whitworth Start fleshing out new Event library, to try and take advantage of green...
authored
607 return result;
8884066 Andrew Whitworth Add in a prototype winxed wrapper for distutils so I can build winxed li...
authored
608 }
a2679db Andrew Whitworth move the setup.winxed file to the root directory. Update it so that it i...
authored
609
3aa3589 Andrew Whitworth fix setup so we can cut an sdist release
authored
610 function get_all_tests(var rosella, string path)
611 {
612 loadlib("os");
a2b3b87 Andrew Whitworth forward declare for OS, to suppress warnings
authored
613 var os = new OS;
3aa3589 Andrew Whitworth fix setup so we can cut an sdist release
authored
614 int STAT_ISREG = 0x8000;
615 int STAT_ISDIR = 0x4000;
616 var contents_raw = os.readdir(path);
617
618 for (string file in contents_raw) {
619 string entry = path + "/" + file;
620 var stat = os.stat(entry);
621 int mode = stat[2];
622 int isdir = 0;
623 ${ band isdir, mode, STAT_ISDIR };
624 int isfile = 0;
625 ${ band isfile, mode, STAT_ISREG };
626 if (file[0] == ".")
627 continue;
628 if (isfile == STAT_ISREG && is_test(entry))
629 rosella["manifest_includes"].push(entry);
630
631 if (isdir == STAT_ISDIR)
632 get_all_tests(rosella, entry);
633 }
634 }
635
636 function is_test(string path)
637 {
638 int len = length(path);
639 string ext = substr(path, len - 2);
640 if (ext == ".t")
641 return 1;
642 else
643 return 0;
644 }
645
adeb72f Andrew Whitworth version information is now stored in Rosella.Version objects.
authored
646 function build_version_file(var rosella)
647 {
648 using newer;
68ac304 Andrew Whitworth Refactor out logic for autocreating paths to a function make_path_for. U...
authored
649 using Rosella.Winxed.Distutils.make_path_for;
650
adeb72f Andrew Whitworth version information is now stored in Rosella.Version objects.
authored
651 string file = "src/_build/_versions.winxed";
68ac304 Andrew Whitworth Refactor out logic for autocreating paths to a function make_path_for. U...
authored
652 make_path_for(file);
adeb72f Andrew Whitworth version information is now stored in Rosella.Version objects.
authored
653 int e = 0;
654 ${ stat e, file, 0 };
655 if (!e || newer("VERSION", file))
656 build_and_compile_version_file(rosella);
657 }
658
659 function clean_version_file(var rosella)
660 {
661 string file = "src/_build/_versions.winxed";
662 using unlink;
663 int e = 0;
664 ${ stat e, file, 0 };
665 if (e) {
666 say("unlink " + file);
667 unlink(file);
668 }
669 }
670
671 function build_and_compile_version_file(var rosella)
672 {
673 print("Reading version information...");
674 var verfile = new 'FileHandle';
675 verfile.open('VERSION', 'r');
676 string text = verfile.readall();
677 verfile.close();
678 var lines = split("\n", text);
679
680 var code = new 'StringBuilder';
681 string preamble = <<:
908afc6 Andrew Whitworth Redo version numbering. Load the versions hash lazily on request. Don't ...
authored
682 namespace Rosella { namespace __PRIVATE_Version
adeb72f Andrew Whitworth version information is now stored in Rosella.Version objects.
authored
683 {
684 // This file is automatically generated by setup.winxed.
685 // DO NOT MODIFY THIS FILE YOURSELF
686 // Seriously, it's a bad idea.
908afc6 Andrew Whitworth Redo version numbering. Load the versions hash lazily on request. Don't ...
authored
687 function __GET_VERSION_HASH[anon]()
adeb72f Andrew Whitworth version information is now stored in Rosella.Version objects.
authored
688 {
908afc6 Andrew Whitworth Redo version numbering. Load the versions hash lazily on request. Don't ...
authored
689 return {
adeb72f Andrew Whitworth version information is now stored in Rosella.Version objects.
authored
690 :>>
691 ;
692 push(code, preamble);
693
694 for (string line in lines) {
695 var parts = split(': ', line);
696 if (elements(parts) != 2)
697 continue;
698 string libname = parts[0];
699 parts = split(' ', parts[1]);
908afc6 Andrew Whitworth Redo version numbering. Load the versions hash lazily on request. Don't ...
authored
700 push(code, sprintf(" '%s' : new Rosella.Version('%s', %s, '%s'),\n", [libname, libname, parts[0], parts[1]]));
adeb72f Andrew Whitworth version information is now stored in Rosella.Version objects.
authored
701 }
702 string postamble = <<:
908afc6 Andrew Whitworth Redo version numbering. Load the versions hash lazily on request. Don't ...
authored
703 "UNKNOWN" : new Rosella.Version('UNKNOWN', -1, 'UNKNOWN')
704 };
adeb72f Andrew Whitworth version information is now stored in Rosella.Version objects.
authored
705 }
706 }}
707 :>>
708 ;
709 push(code, postamble);
710
711 var file = new 'FileHandle';
712 file.open("src/_build/_versions.winxed", "w");
713 file.print(string(code));
714 file.close();
715 say("done.");
716 }
98c343b Andrew Whitworth Add top-level error handling and backtrace printing to setup.winxed, for...
authored
717
718 function main[main](var argv)
719 {
03dbe25 Andrew Whitworth Fix setup.winxed to exit(1) when there is an error. +some comments and s...
authored
720 int exit_code = 0;
67d90fb Andrew Whitworth small fixes. Add FileSystem to list of libraries in README. string, path...
authored
721 if (argv[1] == "test")
722 do_test();
acd78bf Andrew Whitworth Start fleshing out new Event library, to try and take advantage of green...
authored
723 else {
724 try {
725 setup_main(argv);
726 } catch (e) {
727 say(e["message"]);
728 for (string bt in e.backtrace_strings())
729 say(bt);
730 exit_code = 1;
731 }
98c343b Andrew Whitworth Add top-level error handling and backtrace printing to setup.winxed, for...
authored
732 }
acd78bf Andrew Whitworth Start fleshing out new Event library, to try and take advantage of green...
authored
733 if (exit_code != 0)
734 exit(exit_code);
98c343b Andrew Whitworth Add top-level error handling and backtrace printing to setup.winxed, for...
authored
735 }
Something went wrong with that request. Please try again.