Commit graph

15134 commits

Author SHA1 Message Date
Florian Klink
0ec77274f5 README: document current runner logic in detail 2019-12-04 11:43:32 +01:00
Florian Klink
2a4d5516e4 submitqueue.runner: fix typo in comment 2019-12-04 11:43:32 +01:00
Florian Klink
0175a10657 gerrit.client: update internal head after triggering a rebase
And we of course don't need to update HEAD if we just rebased a random
changeset.
2019-12-04 11:43:32 +01:00
Florian Klink
60a81b808c submitqueue.runner.Trigger: return instead of break
We're inside two loops, but when havint to sleep, we want to exit the whole trigger function.
2019-12-03 23:55:08 +01:00
Florian Klink
ece32d3d7c gerrit.series.AssembleSeries: improve logging, also log i and j 2019-12-03 23:54:41 +01:00
Florian Klink
fb9e9fa724 remove submitqueue/test_runner.go 2019-12-03 11:09:50 +01:00
Florian Klink
200ad6332b main.go: log errors if they are returned from runner.Trigger() 2019-12-03 11:07:44 +01:00
Florian Klink
241ec393ac main: actually multiply triggerInterval by time.Second, not time.Minute
Otherwise, we'd wait a little bit too long ;-)
2019-12-03 10:58:39 +01:00
Florian Klink
4ea1a5a2f0 main.go: add --trigger-interval cli flag 2019-12-03 10:44:29 +01:00
Florian Klink
77fe8a8e1f runner: use submittable field
This simplifies logic, and makes it generally more usable with other
project submit rules.
2019-12-03 10:20:02 +01:00
Florian Klink
5acc403e28 changeset: fetch SUBMITTABLE and add field to struct 2019-12-03 10:16:32 +01:00
Abseil Team
a4b757b5d4 Export of internal Abseil changes
--
693f81830b9f9cc8b24a1f38492b8dfcdd1d0e24 by Abseil Team <absl-team@google.com>:

Check that absl::int128 works as a std::chrono::duration::rep.

In particular, validate that ...
  std::chrono::time_point<std::chrono::system_clock,
                          std::chrono::duration<absl::int128,
                                                std::atto>>
is a superset (range and resolution) of absl::Time.

PiperOrigin-RevId: 283370280

--
df6073b686bd44223c6f9070fcceec918c728871 by Gennadiy Rozental <rogeeff@google.com>:

Changes thread annotations to use DataGuard() function instead of a specific Mutex.
Remove unused declaration of InvokeCallback.

PiperOrigin-RevId: 283361188

--
b49eb2dd2ee1a0b4c8a7bb1a94e368b81ce5f861 by Abseil Team <absl-team@google.com>:

Rewrite GetNominalCPUFrequency to use advapi32 instead of shlwapi

Using shlwapi.dll means that gdi32.dll is loaded which then makes process destruction more expensive, which is unacceptable for some uses. There may be other places that pull in gdi32.dll - this just fixes the one.

PiperOrigin-RevId: 282960698

--
b5508afec5099a0fdbb55e39a7cd2993259ed860 by Abseil Team <absl-team@google.com>:

Small typo fix in comments: initiazliation -> initialization

PiperOrigin-RevId: 282891800

--
4319cc419584e91ee74f6ae1a32d88a412fc5c01 by Abseil Team <absl-team@google.com>:

Update c_find_first_of() comment to remove the mention of an ordered container.

PiperOrigin-RevId: 282836540

--
5fcabc0a834dff39a505d5a5fc5403ddeb96028e by Derek Mauro <dmauro@google.com>:

Fix NaCl build, where format checking is broken

PiperOrigin-RevId: 282826202

--
aaf9ad3274c056a2f68e9b8ccada45c9802e2f1e by Derek Mauro <dmauro@google.com>:

Fix more -Wundef warnings

PiperOrigin-RevId: 282799820

--
1fb06150a70ffe98bf4b2d42b2a39d083bf44f8c by Derek Mauro <dmauro@google.com>:

Release support for additional platforms

PiperOrigin-RevId: 282793384

--
fa947fc28624a316fa872d7045b3838b88a0d69b by Derek Mauro <dmauro@google.com>:

Cleanup inconsistent usage of __has_attribute

PiperOrigin-RevId: 282793296

--
990030ad282263d6303c83b780a55fdec8e90d43 by Gennadiy Rozental <rogeeff@google.com>:

Eliminate the pointer in absl::Flag, which points to n space where we were storing flag's default value. We also eliminate additional (now unnecessary) allocation for flag's default value.
Instead we'll initialize the flags value directly from the value specified in ABSL_FLAG.
If the default value is updated via the call to SetCommandLineOptionWithMode we are replacing pointer to initialization routine to pointer to new default value.

PiperOrigin-RevId: 282637616
GitOrigin-RevId: 693f81830b9f9cc8b24a1f38492b8dfcdd1d0e24
Change-Id: I6f2edd8ef844de09aa2c182a7ca3133a22364792
2019-12-02 15:53:43 -05:00
Vincent Ambo
d23716f354 refactor(read-tree): Keep traversing even if a default.nix is found
This makes it possible for people to drop a default.nix into folders
along the way that add additional things into the attribute set at
that level.

These default.nix files are imported and merged with the rest of the
traversal from that point on. In theory nothing stops a user from
putting a derivation into one of them, but the effects of merging that
derivation's underlying attribute set with random other things from
the traversal are undefined.

This feature is being introduced for a slight revamp of the thirdParty
layout.
2019-12-02 15:05:54 +00:00
Florian Klink
0e8aa14045 gerrit.Client: set projectName and branchName 2019-12-02 14:38:23 +01:00
Florian Klink
8129de3b9a runner: check gerrit.Refresh() for errors 2019-12-02 14:37:38 +01:00
Florian Klink
118a88dace add rotatingloghandler which removes older log entries 2019-12-02 12:03:46 +01:00
Florian Klink
04a24a0c60 Use Runner
This revamps code quite a bit. Series handling has been moved into the
gerrit client, it also handles caching.

The Runner logic itself has been greatly simplified.

The runner logic has been moved into the runner.go, submitqueue.go is
gone.

The "per-run result object" concept has been dropped - we instead just
use annotated logs.

Also, we switched to apex/log
2019-12-02 10:00:32 +01:00
Griffin Smith
e619dcd126 Eating doesn't take time unless you actually eat
Make it so that opening the eat menu but not actually eating anything
(either because you cancel, or because there's nothing to eat) doesn't
step the game
2019-11-30 22:48:29 -05:00
Griffin Smith
65b1352ef2 Add a very basic inventory panel
Add a very basic inventory panel to the game opened by pressing `i`,
which displays the contents of the player's inventory in a basic list.
2019-11-30 22:43:17 -05:00
Griffin Smith
71b628c604 Add messages on the ground
Add support for a "GroundMessage" entity type, support for a Read
command to read them, and randomly place an initial, tone-setting
tutorial message on the ground near the character at the beginning of
the game.
2019-11-30 19:55:43 -05:00
Chris Feng
6a3e9b2c64 Avoid redundant input focus transfer
* exwm-input.el (exwm-input--set-focus): Check for current focused
X window before making an input focus transfer.
(exwm-input--on-buffer-list-update): Remove the `this-command' check.
2019-12-01 00:00:00 +00:00
Griffin Smith
4431d453f6 Use correct bin path in README
nix build for a haskell package makes a directory, not just a bare
binary.
2019-11-30 18:25:32 -05:00
Griffin Smith
0b22bb099c Fail on all warnings in CI
All the undefineds are gone, so it's time to enable -Werror in CI.
2019-11-30 18:16:48 -05:00
Griffin Smith
97a5c61f28 Fix an injectivity issue with saving the game
Fix an injectivity issue with JSON-encoding the entity map that was
causing the game saving to not properly round-trip. As part of this,
there's a refactor to the internals of the entity map to use sets
instead of vectors, which should also get us a nice perf boost.
2019-11-30 15:00:39 -05:00
Griffin Smith
310ea90985 Add build and run instructions to the README
just for the heck of it.
2019-11-30 14:13:07 -05:00
Griffin Smith
92976cc9aa Move patch file to a less obtrusive location 2019-11-29 23:01:36 -05:00
Griffin Smith
8a1235c3dc Use menus for combat and picking up items
Refactor a bunch of stuff around to allow for polymorphically surfacing
an EntityChar for all entities, and use this to write a generic
`entityMenu` function, which generates a menu from the chars of a list
of entities - and use that to fully implement (removing `undefined`)
menus for both attacking and picking things up when there are multiple
entities on the relevant tile.
2019-11-29 22:59:15 -05:00
Griffin Smith
7d8ce026a2 Add DerivingVia newtype for generic arbitrary
Add a newtype, GenericArbitrary, which can be used with -XDerivingVia to
derive Arbitrary instances for types with Generic, via patching
generic-arbitrary to expose the underlying typeclass it uses for
surfacing the type information.
2019-11-29 22:57:58 -05:00
Griffin Smith
0abcd8c958 Implement a "look" command
Implement the PointOnMap prompt type, which allows the player to move
the cursor around and select a position on the map, and use this prompt
type to implement a "look" command, describing all entities at the
selected position.
2019-11-29 21:25:35 -05:00
Griffin Smith
f37d0f75c0 Implement saving+loading the game
Implement ToJSON and FromJSON for all of the various pieces of the game
state, and add a pair of functions saveGame/loadGame implementing a
prism to save the game as zlib-compressed JSON. To test this, there's
now Arbitrary, CoArbitrary, and Function instances for all the parts of
the game state - to get around circular imports with the concrete
entities this unfortunately is happening via orphan instances, plus an
hs-boot file to break a circular import that was just a little too hard
to remove by moving things around. Ugh.
2019-11-29 14:33:52 -05:00
Florian Klink
7bafef7a84 runner: document NewRunner 2019-11-27 19:49:39 +01:00
Florian Klink
cd40e68dde submit-queue.tmpl: move HEAD information to result 2019-11-27 19:39:42 +01:00
Florian Klink
ba62db97e9 result: move code into separate result.go 2019-11-27 19:33:37 +01:00
Florian Klink
4c555f330e submit-queue.tmpl.html: improve log rendering 2019-11-27 19:32:14 +01:00
Florian Klink
192835278c submitqueue.submitqueue: document Result functions 2019-11-27 19:32:14 +01:00
Griffin Smith
2f2e5a0b68 Gitignore source before passing to nix
Call hercules-ci's gitignoreSource on the src path before passing to
nix, which both prevents spurious rebuilds and also makes compilation
via `nix build` (which under the hood uses cabal v1-build) work while
also doing development using `cabal new-build`
2019-11-27 13:20:46 -05:00
Florian Klink
fdfcf7967a submit-queue.tmpl: fix accordion, remove "Current Queue"
The Current Queue in fact is just the latest log element.
2019-11-27 19:18:15 +01:00
Florian Klink
917db9e9fd submit-queue.tmpl.html: remove stray </code> 2019-11-27 19:17:22 +01:00
Vincent Ambo
9d6792609f
Merge pull request #10 from tazjin/feat/buildGo-dot-nix
Introduce Bazel-style Nix build system for Go
2019-11-27 15:47:52 +00:00
Vincent Ambo
0bd085f5d6 chore(overrides): Import buildGo.nix from external repository 2019-11-27 15:20:24 +00:00
Vincent Ambo
28e587b348 docs: Add README file that describes project usage & background 2019-11-27 15:14:43 +00:00
Florian Klink
a00a24d459 submit-queue.tmpl.html: navbar-expand-{lg->sm} 2019-11-27 13:13:48 +01:00
Florian Klink
e6482a9725 submit-queue.tmpl.html: add history visualizer 2019-11-27 13:05:22 +01:00
Florian Klink
91deabe4b3 submitqueue.Run: copy series into result object after loading them from gerrit
So we have them in the history later.
2019-11-27 13:03:17 +01:00
Florian Klink
87d09f6163 submitqueue: Result: record startTime during a new MakeResult constructor, return EndTime properly
even without any LogEntries
2019-11-27 13:02:20 +01:00
Florian Klink
089e551b72 tmpl: move #region-queue to heading
the series block will get reused, and we don't want the same ID to
appear twice.
2019-11-27 13:01:21 +01:00
Florian Klink
d81ae74999 frontend: reorder things passed to template 2019-11-27 13:00:50 +01:00
Florian Klink
69f0963a17 render series via a separate block 2019-11-27 11:41:45 +01:00
Florian Klink
151cc75532 render serie via a separate block 2019-11-27 11:40:52 +01:00
Florian Klink
1b249600e5 render changeset via a separate block 2019-11-27 11:35:07 +01:00