From f0ad4fddb4685fd980edace998a91b5f30d99317 Mon Sep 17 00:00:00 2001 From: Ryan Daum Date: Fri, 9 Feb 2024 19:58:53 -0500 Subject: [PATCH] the (rdaum) suffix in the TODOs didn't do what I thought it would do --- crates/compiler/src/ast.rs | 2 +- crates/compiler/src/builtins.rs | 2 +- crates/compiler/src/codegen.rs | 2 +- crates/compiler/src/decompile.rs | 6 +++--- crates/compiler/src/opcode.rs | 2 +- crates/compiler/src/parse.rs | 2 +- crates/compiler/src/program.rs | 4 ++-- crates/compiler/src/unparse.rs | 2 +- crates/console-host/src/main.rs | 2 +- crates/daemon/src/rpc_server.rs | 8 ++++---- crates/daemon/src/rpc_session.rs | 4 ++-- crates/db/src/db_tx.rs | 2 +- crates/db/src/db_worldstate.rs | 2 +- crates/db/src/odb/rb_worldstate.rs | 2 +- crates/db/src/rdb/base_relation.rs | 8 ++++---- crates/db/src/rdb/paging/cold_storage.rs | 6 +++--- crates/db/src/rdb/paging/page_storage.rs | 16 ++++++++-------- crates/db/src/rdb/paging/slotted_page.rs | 4 ++-- crates/db/src/rdb/paging/tuple_box.rs | 12 ++++++------ crates/db/src/rdb/paging/tuple_ptr.rs | 4 ++-- crates/db/src/rdb/paging/wal.rs | 2 +- crates/db/src/rdb/pool/buffer_pool.rs | 2 +- crates/db/src/rdb/relbox.rs | 2 +- crates/db/src/rdb/tx/transaction.rs | 2 +- crates/db/tests/worldstate_restore.rs | 2 +- crates/kernel/src/builtins/bf_list_sets.rs | 2 +- crates/kernel/src/builtins/bf_server.rs | 6 +++--- crates/kernel/src/builtins/bf_verbs.rs | 4 ++-- crates/kernel/src/tasks/command_parse.rs | 2 +- crates/kernel/src/tasks/scheduler.rs | 6 +++--- crates/kernel/src/tasks/sessions.rs | 2 +- crates/kernel/src/tasks/task.rs | 6 +++--- crates/kernel/src/tasks/task_messages.rs | 2 +- crates/kernel/src/textdump/read.rs | 2 +- crates/kernel/src/textdump/write.rs | 2 +- crates/kernel/src/vm/exec_state.rs | 2 +- crates/kernel/src/vm/vm_execute.rs | 4 ++-- crates/kernel/src/vm/vm_test.rs | 2 +- crates/rpc-common/src/lib.rs | 2 +- crates/values/src/model/match.rs | 2 +- crates/values/src/model/mod.rs | 2 +- crates/values/src/model/objset.rs | 2 +- crates/values/src/model/propdef.rs | 2 +- crates/values/src/model/verbdef.rs | 2 +- crates/values/src/model/world_state.rs | 2 +- crates/values/src/var/list.rs | 2 +- crates/values/src/var/varops.rs | 2 +- crates/web-host/src/client/browser.html | 8 ++++---- crates/web-host/src/client/editor.js | 4 ++-- crates/web-host/src/client/root.html | 4 ++-- 50 files changed, 89 insertions(+), 89 deletions(-) diff --git a/crates/compiler/src/ast.rs b/crates/compiler/src/ast.rs index 5dee18ab..64410ca6 100644 --- a/crates/compiler/src/ast.rs +++ b/crates/compiler/src/ast.rs @@ -188,7 +188,7 @@ pub struct Stmt { /// Note that this is not necessarily the same as the line number that will be reported into /// codegen, and may not correspond to what shows as a result of `unparse`; that line number /// is derived from the AST, not the parser. - /// TODO(rdaum): I may or may not keep this field around. + /// TODO(): I may or may not keep this field around. pub parser_line_no: usize, /// This line number is generated during a second pass over the tree, and is used to generate /// the line number spans in the bytecode. diff --git a/crates/compiler/src/builtins.rs b/crates/compiler/src/builtins.rs index fe8084ed..8cbccf20 100644 --- a/crates/compiler/src/builtins.rs +++ b/crates/compiler/src/builtins.rs @@ -45,7 +45,7 @@ pub struct Builtin { } // Originally generated using ./generate_bf_list.py -// TODO(rdaum): this list is inconsistently used, and falls out of date. It's only used for generating +// TODO(): this list is inconsistently used, and falls out of date. It's only used for generating // the list of functions for the `function_info` built-in right now. It could be used for // validating arguments, and could be part of the registration process for the actual builtin // implementations. diff --git a/crates/compiler/src/codegen.rs b/crates/compiler/src/codegen.rs index 3c19901e..01898c5e 100644 --- a/crates/compiler/src/codegen.rs +++ b/crates/compiler/src/codegen.rs @@ -734,7 +734,7 @@ impl CodegenState { } fn generate_arg_list(&mut self, args: &Vec) -> Result<(), CompileError> { - // TODO(rdaum): Check recursion down to see if all literal values, and if so reduce to a Imm value with the full list, + // TODO(): Check recursion down to see if all literal values, and if so reduce to a Imm value with the full list, // instead of concatenation with MkSingletonList. if args.is_empty() { self.emit(Op::ImmEmptyList); diff --git a/crates/compiler/src/decompile.rs b/crates/compiler/src/decompile.rs index 5d516b1c..baf3015e 100644 --- a/crates/compiler/src/decompile.rs +++ b/crates/compiler/src/decompile.rs @@ -297,7 +297,7 @@ impl Decompile { )); } // Same as above, but with id. - // TODO(rdaum): we may want to consider collapsing these two VM opcodes + // TODO(): we may want to consider collapsing these two VM opcodes Op::WhileId { id, end_label: loop_end_label, @@ -654,7 +654,7 @@ impl Decompile { } // Decompile the body. // Means decompiling until we hit EndExcept, so scan forward for that. - // TODO(rdaum): make sure that this doesn't fail with nested try/excepts? + // TODO(): make sure that this doesn't fail with nested try/excepts? let (body, end_except) = self.decompile_statements_until_match(|_, o| matches!(o, Op::EndExcept(_)))?; let Op::EndExcept(end_label) = end_except else { @@ -822,7 +822,7 @@ impl Decompile { } Op::EndCatch(_) | Op::Continue | Op::EndExcept(_) | Op::EndFinally => { // Early exit; main logic is in TRY_FINALLY or CATCH etc case, above - // TODO(rdaum): MOO has "return ptr - 2;" -- doing something with the iteration, that + // TODO(): MOO has "return ptr - 2;" -- doing something with the iteration, that // I may not be able to do with the current structure. See if I need to unreachable!("should have been handled other decompilation branches") } diff --git a/crates/compiler/src/opcode.rs b/crates/compiler/src/opcode.rs index dc36ca8d..883f0290 100644 --- a/crates/compiler/src/opcode.rs +++ b/crates/compiler/src/opcode.rs @@ -113,7 +113,7 @@ mod tests { use crate::{Label, Name, Offset}; /// Verify we don't go over our 16 byte budget for opcodes. - // TODO(rdaum): This is still rather bloated. + // TODO(): This is still rather bloated. #[test] fn size_opcode() { use crate::opcode::Op; diff --git a/crates/compiler/src/parse.rs b/crates/compiler/src/parse.rs index a9e3cdb0..4903c4b4 100644 --- a/crates/compiler/src/parse.rs +++ b/crates/compiler/src/parse.rs @@ -187,7 +187,7 @@ fn parse_expr( .op(Op::infix(Rule::lor, Assoc::Left)) // 11. Logical and. .op(Op::infix(Rule::land, Assoc::Left)) - // TODO(rdaum): bitwise operators here (| 10, ^ XOR 9, & 8) if we ever get them. + // TODO(): bitwise operators here (| 10, ^ XOR 9, & 8) if we ever get them. // 7 // Equality/inequality .op(Op::infix(Rule::eq, Assoc::Left) | Op::infix(Rule::neq, Assoc::Left)) diff --git a/crates/compiler/src/program.rs b/crates/compiler/src/program.rs index 7901f5dc..23e7eba7 100644 --- a/crates/compiler/src/program.rs +++ b/crates/compiler/src/program.rs @@ -39,7 +39,7 @@ pub struct Program { pub fork_vectors: Vec>, /// As each statement is pushed, the line number is recorded, along with its offset in the main /// vector. - /// TODO(rdaum): fork vector offsets... Have to think about that one. + /// TODO(): fork vector offsets... Have to think about that one. pub line_number_spans: Vec<(usize, usize)>, } @@ -98,7 +98,7 @@ impl Display for Program { writeln!(f, "V{}: {}", i, v)?; } - // TODO(rdaum): print fork vectors + // TODO(): print fork vectors // Display main vector (program); opcodes are indexed by their offset for (i, op) in self.main_vector.iter().enumerate() { diff --git a/crates/compiler/src/unparse.rs b/crates/compiler/src/unparse.rs index 7db8b778..82250d0d 100644 --- a/crates/compiler/src/unparse.rs +++ b/crates/compiler/src/unparse.rs @@ -35,7 +35,7 @@ impl Expr { // directly on http://en.cppreference.com/w/cpp/language/operator_precedence // Should be kept in sync with the pratt parser in `parse.rs` // Starting from lowest to highest precedence... - // TODO(rdaum): drive Pratt and this from one common precedence table. + // TODO(): drive Pratt and this from one common precedence table. let cpp_ref_prep = match self { Expr::Scatter(_, _) | Expr::Assign { .. } => 14, Expr::Cond { .. } => 13, diff --git a/crates/console-host/src/main.rs b/crates/console-host/src/main.rs index 80e2fbaa..2e58f88b 100644 --- a/crates/console-host/src/main.rs +++ b/crates/console-host/src/main.rs @@ -291,7 +291,7 @@ fn console_loop( let mut rl = DefaultEditor::new().unwrap(); loop { - // TODO(rdaum): unprovoked output from the narrative stream screws up the prompt midstream, + // TODO(): unprovoked output from the narrative stream screws up the prompt midstream, // but we have no real way to signal to this loop that it should newline for // cleanliness. Need to figure out something for this. let input_request_id = input_request_id.lock().unwrap().take(); diff --git a/crates/daemon/src/rpc_server.rs b/crates/daemon/src/rpc_server.rs index 6209a593..33de233e 100644 --- a/crates/daemon/src/rpc_server.rs +++ b/crates/daemon/src/rpc_server.rs @@ -445,7 +445,7 @@ impl RpcServer { args: Vec, attach: bool, ) -> Result { - // TODO(rdaum): change result of login to return this information, rather than just Objid, so + // TODO(): change result of login to return this information, rather than just Objid, so // we're not dependent on this. let connect_type = if args.first() == Some(&"create".to_string()) { ConnectType::Created @@ -590,7 +590,7 @@ impl RpcServer { }; // Try to submit to do_command as a verb call first and only parse_command after that fails. - // TODO(rdaum): fold this functionality into Task. + // TODO(): fold this functionality into Task. let arguments = parse_into_words(command.as_str()); if let Ok(task_id) = self.clone().scheduler.submit_verb_task( @@ -660,7 +660,7 @@ impl RpcServer { return Err(RpcRequestError::InternalError(e.to_string())); } - // TODO(rdaum): do we need a new response for this? Maybe just a "Thanks"? + // TODO(): do we need a new response for this? Maybe just a "Thanks"? Ok(RpcResponse::InputThanks) } @@ -994,7 +994,7 @@ impl RpcServer { } } - // TODO(rdaum): we will need to verify that the player object id inside the token is valid inside + // TODO(): we will need to verify that the player object id inside the token is valid inside // moor itself. And really only something with a WorldState can do that. So it's not // enough to have validated the auth token here, we will need to pepper the scheduler/task // code with checks to make sure that the player objid is valid before letting it go diff --git a/crates/daemon/src/rpc_session.rs b/crates/daemon/src/rpc_session.rs index fd839f67..9c57e532 100644 --- a/crates/daemon/src/rpc_session.rs +++ b/crates/daemon/src/rpc_session.rs @@ -29,9 +29,9 @@ pub struct RpcSession { client_id: Uuid, rpc_server: Arc, player: Objid, - // TODO(rdaum): manage this buffer better -- e.g. if it grows too big, for long-running tasks, etc. it + // TODO(): manage this buffer better -- e.g. if it grows too big, for long-running tasks, etc. it // should be mmap'd to disk or something. - // TODO(rdaum): We could also use Boxcar or other append-only lockless container for this, since we only + // TODO(): We could also use Boxcar or other append-only lockless container for this, since we only // ever append. session_buffer: Mutex>, } diff --git a/crates/db/src/db_tx.rs b/crates/db/src/db_tx.rs index a83a65ac..920cd43a 100644 --- a/crates/db/src/db_tx.rs +++ b/crates/db/src/db_tx.rs @@ -96,7 +96,7 @@ pub trait DbTransaction { fn get_verbs(&self, obj: Objid) -> Result; /// Get the binary of the given verb. - // TODO(rdaum): "binaries" returned from the db should be SliceRefs, not Vecs. + // TODO(): "binaries" returned from the db should be SliceRefs, not Vecs. fn get_verb_binary(&self, obj: Objid, uuid: Uuid) -> Result, WorldStateError>; /// Find & get the verb with the given name on the given object. diff --git a/crates/db/src/db_worldstate.rs b/crates/db/src/db_worldstate.rs index ab79030f..d65ebd28 100644 --- a/crates/db/src/db_worldstate.rs +++ b/crates/db/src/db_worldstate.rs @@ -106,7 +106,7 @@ impl WorldState for DbTxWorldState { let owner = (owner != NOTHING).then_some(owner); - // TODO(rdaum): ownership_quota support + // TODO(): ownership_quota support // If the intended owner of the new object has a property named `ownership_quota' and the value of that property is an integer, then `create()' treats that value // as a "quota". If the quota is less than or equal to zero, then the quota is considered to be exhausted and `create()' raises `E_QUOTA' instead of creating an // object. Otherwise, the quota is decremented and stored back into the `ownership_quota' property as a part of the creation of the new object. diff --git a/crates/db/src/odb/rb_worldstate.rs b/crates/db/src/odb/rb_worldstate.rs index a36acfd1..079ad39b 100644 --- a/crates/db/src/odb/rb_worldstate.rs +++ b/crates/db/src/odb/rb_worldstate.rs @@ -109,7 +109,7 @@ impl DbTransaction for RelBoxTransaction { } fn get_players(&self) -> Result { - // TODO(rdaum): Improve get_players retrieval in world state + // TODO(): Improve get_players retrieval in world state // this is going to be not-at-all performant in the long run, and we'll need a way to // cache this or index it better get_all_object_keys_matching( diff --git a/crates/db/src/rdb/base_relation.rs b/crates/db/src/rdb/base_relation.rs index 8b480f7b..9c30650d 100644 --- a/crates/db/src/rdb/base_relation.rs +++ b/crates/db/src/rdb/base_relation.rs @@ -26,16 +26,16 @@ use crate::rdb::RelationId; /// stored and managed as raw byte-arrays and it is up to layers above to interpret the the values /// correctly. /// -// TODO(rdaum): Add some kind of 'type' flag to the relation & tuple values, +// TODO(): Add some kind of 'type' flag to the relation & tuple values, // so that we can do type-checking on the values, though for our purposes this may be overkill at this time. -// TODO(rdaum): Base relations right now are not true binary relations, they are key-value pairs. +// TODO(): Base relations right now are not true binary relations, they are key-value pairs. // all the 'seek' type operations should be returning a *set* of tuples that match, not // a single one. right now this is behaving like a key-value pair, not a proper binary relation. // means changing the indexes here to point to sets of tuples, not single tuples. right now // for moor's purposes this is irrelevant, but it will be important for proper implementation of // joins and other relational operations. -// TODO(rdaum): Indexes should be paged. -// TODO(rdaum): support ordered indexes, not just hash indexes. +// TODO(): Indexes should be paged. +// TODO(): support ordered indexes, not just hash indexes. // if we're staying with in-memory, use an Adaptive Radix Tree; my implementation, but hopefully // modified to support CoW/shared ownership of the tree nodes, like the im::HashMap does. // if we're going to support on-disk indexes, use a CoW B+Tree, which I have implemented elsewhere, diff --git a/crates/db/src/rdb/paging/cold_storage.rs b/crates/db/src/rdb/paging/cold_storage.rs index 1625694b..df10ad92 100644 --- a/crates/db/src/rdb/paging/cold_storage.rs +++ b/crates/db/src/rdb/paging/cold_storage.rs @@ -12,7 +12,7 @@ // this program. If not, see . // -//! TODO(rdaum): replace OkayWAL with our own WAL implementation +//! TODO(): replace OkayWAL with our own WAL implementation use std::collections::{HashMap, HashSet}; use std::path::PathBuf; @@ -34,7 +34,7 @@ use crate::rdb::tx::WorkingSet; use super::backing::{BackingStoreClient, WriterMessage}; -// TODO(rdaum): move "cold storage" functionality under the pager rather than above it. +// TODO(): move "cold storage" functionality under the pager rather than above it. /// Uses WAL + custom page store as the persistent backing store & write-ahead-log for the rdb. pub struct ColdStorage {} @@ -190,7 +190,7 @@ impl ColdStorage { // Where we stick all the page mutations we're going to write out. let mut write_batch = vec![]; - // TODO(rdaum): sequences shouldn't mutate if they haven't changed during the + // TODO(): sequences shouldn't mutate if they haven't changed during the // transaction, so we need some kind of signal from above that they have // changed. diff --git a/crates/db/src/rdb/paging/page_storage.rs b/crates/db/src/rdb/paging/page_storage.rs index ce2a2cb4..0d3a355d 100644 --- a/crates/db/src/rdb/paging/page_storage.rs +++ b/crates/db/src/rdb/paging/page_storage.rs @@ -12,7 +12,7 @@ // this program. If not, see . // -// TODO(rdaum): Robustness testing and proofing for page storage and WAL. +// TODO(): Robustness testing and proofing for page storage and WAL. // A battery of tests is going to be needed on this, to verify the ACIDity. use std::collections::{HashMap, HashSet}; @@ -37,7 +37,7 @@ use crate::rdb::RelationId; /// The size of the submission queue for the io_uring, in requests. /// We currently do not have any way to handle backpressure, so we will not be able to handle WAL /// writes faster than this so this is set very large. -// TODO(rdaum): we should probably have a way to handle io_uring backpressure. +// TODO(): we should probably have a way to handle io_uring backpressure. const IO_URING_SUBMISSION_Q_SIZE: u32 = 4096; #[derive(Debug)] @@ -62,13 +62,13 @@ pub enum PageStoreMutation { /// Each page is a fixed size. /// Uses io_uring to do the writes async. Reads are synchronous /// -/// TODO(rdaum): deleted pages are not destroyed, they are just left on disk, which means if the same +/// TODO(): deleted pages are not destroyed, they are just left on disk, which means if the same /// page id is re-used, the old data could be read. -/// TODO(rdaum): right now page storage is page-per-file which is maybe not the most efficient. -/// TODO(rdaum): verify the fsync chained to writes via io_uring is actually working, and that +/// TODO(): right now page storage is page-per-file which is maybe not the most efficient. +/// TODO(): verify the fsync chained to writes via io_uring is actually working, and that /// the durability guarantees are, at least approximately, correct. -/// TODO(rdaum): we'll need reads once eviction/paging is implemented. -/// TODO(rdaum): we should have CRCs on disk-bound pages, and verify them on reads. +/// TODO(): we'll need reads once eviction/paging is implemented. +/// TODO(): we should have CRCs on disk-bound pages, and verify them on reads. /// could live in the page header maybe pub struct PageStore { @@ -297,7 +297,7 @@ impl PageStore { // Open all the pages mentioned in the batch and index them by page id so we only have one file descriptor // open per page file. - // TODO(rdaum): it's possible to preregister file descriptors with io_uring to potentially speed things up, but + // TODO(): it's possible to preregister file descriptors with io_uring to potentially speed things up, but // I had some trixky issues with that, so for now we'll just open a new file descriptor for each batch. let mut pages = HashMap::new(); for mutation in &batch { diff --git a/crates/db/src/rdb/paging/slotted_page.rs b/crates/db/src/rdb/paging/slotted_page.rs index e32962dd..3d01c4bc 100644 --- a/crates/db/src/rdb/paging/slotted_page.rs +++ b/crates/db/src/rdb/paging/slotted_page.rs @@ -362,7 +362,7 @@ impl<'a> SlottedPage<'a> { } fn remove_slot(&self, slot_id: SlotId) -> Result<(usize, usize, bool), TupleBoxError> { - // TODO(rdaum): slots at start of content-length can be removed by shrinking the content-length + // TODO(): slots at start of content-length can be removed by shrinking the content-length // portion. let mut index_entry = self.get_index_entry_mut(slot_id); @@ -376,7 +376,7 @@ impl<'a> SlottedPage<'a> { let mut header = self.header_mut(); header.as_mut().sub_used(slot_size); - // TODO(rdaum): join adjacent free tuple slots. + // TODO(): join adjacent free tuple slots. // Likewise at insert, support splitting slots. let is_empty = header.used_bytes == 0; if is_empty { diff --git a/crates/db/src/rdb/paging/tuple_box.rs b/crates/db/src/rdb/paging/tuple_box.rs index 1b59c825..514fd50f 100644 --- a/crates/db/src/rdb/paging/tuple_box.rs +++ b/crates/db/src/rdb/paging/tuple_box.rs @@ -12,16 +12,16 @@ // this program. If not, see . // -// TODO(rdaum): add fixed-size slotted page impl for Sized items, +// TODO(): add fixed-size slotted page impl for Sized items, // should be way more efficient for the most common case of fixed-size tuples. -// TODO(rdaum): implement the ability to expire and page-out tuples +// TODO(): implement the ability to expire and page-out tuples // based on LRU or random/second // chance eviction (ala leanstore). will require separate PageIds from Bids, and will // involve rewriting TuplePtr on the fly to point to a new page when restored. // TuplePtr will also get a new field for last-access-time, so that we can do our eviction -// TODO(rdaum): verify locking/concurrency safety of the pager & tuple storage +// TODO(): verify locking/concurrency safety of the pager & tuple storage // loom test, stateright, or jepsen, etc. -// TODO(rdaum): improve dynamic slot allocation packing in slotted page +// TODO(): improve dynamic slot allocation packing in slotted page // there is still some really gross stuff in here about the management of free space in // pages in the allocator list. It's probably causing excessive fragmentation because we're // considering only the reported available "content" area when fitting slots, and there seems @@ -196,7 +196,7 @@ impl TupleBox { } struct Inner { - // TODO(rdaum): Consolidate page allocation vs buffer locking + // TODO(): Consolidate page allocation vs buffer locking // buffer pool has its own locks per size class, so we might not need this inside another lock // *but* the other two items here are not thread-safe, and we need to maintain consistency across the three. // so we can maybe get rid of the locks in the buffer pool... @@ -432,7 +432,7 @@ impl Inner { } } - // TODO(rdaum): initial textdump load seems to have a problem with initial inserts having a too-low refcount? + // TODO(): initial textdump load seems to have a problem with initial inserts having a too-low refcount? // but once the DB is established, it's fine. So maybe this is a problem with insert tuple allocation? warn!( "Page not found in used pages in allocator on free; pid {}; could be double-free, dangling weak reference?", diff --git a/crates/db/src/rdb/paging/tuple_ptr.rs b/crates/db/src/rdb/paging/tuple_ptr.rs index 12fb3d3b..fa7a9c0a 100644 --- a/crates/db/src/rdb/paging/tuple_ptr.rs +++ b/crates/db/src/rdb/paging/tuple_ptr.rs @@ -26,7 +26,7 @@ use crate::rdb::tuples::TupleId; /// Adds a layer of indirection to each tuple access, but is better than passing around tuple ids + TupleBox /// references. -// TODO(rdaum): rather than decoding a tuple out of a buffer in a slot, the slot should just hold the tuple structure +// TODO(): rather than decoding a tuple out of a buffer in a slot, the slot should just hold the tuple structure pub struct TuplePtr { tb: Arc, id: TupleId, @@ -101,7 +101,7 @@ impl TuplePtr { #[inline] pub(crate) fn as_mut_ptr(&mut self) -> *mut T { - // TODO(rdaum): if the ptr is null, this is a page fault, and we'll + // TODO(): if the ptr is null, this is a page fault, and we'll // need to ask the tuplebox to ask the pager to page us in self.bufaddr.load(std::sync::atomic::Ordering::SeqCst) as *mut T } diff --git a/crates/db/src/rdb/paging/wal.rs b/crates/db/src/rdb/paging/wal.rs index 3a38a573..4fc79e4e 100644 --- a/crates/db/src/rdb/paging/wal.rs +++ b/crates/db/src/rdb/paging/wal.rs @@ -152,7 +152,7 @@ binary_layout!(wal_entry_header, LittleEndian, { relation_id: u8, }); -// TODO(rdaum): use builder pattern for WAL entry construction +// TODO(): use builder pattern for WAL entry construction #[allow(clippy::too_many_arguments)] pub fn make_wal_entry( typ: WalEntryType, diff --git a/crates/db/src/rdb/pool/buffer_pool.rs b/crates/db/src/rdb/pool/buffer_pool.rs index 9b23a6cc..4bc23d65 100644 --- a/crates/db/src/rdb/pool/buffer_pool.rs +++ b/crates/db/src/rdb/pool/buffer_pool.rs @@ -33,7 +33,7 @@ use crate::rdb::pool::size_class::SizeClass; use crate::rdb::pool::{Bid, PagerError}; // 32k -> 1MB page sizes supported. -// TODO(rdaum): Handle storage of big-values / big-pages / blobs +// TODO(): Handle storage of big-values / big-pages / blobs // If we end up with values bigger than 1MB, they should probably be handled by "external" pages, // that is, pages that are not part of the buffer pool, but are instead read directly from file // references as needed, because they are likely to just thrash the crap out of the buffer pool diff --git a/crates/db/src/rdb/relbox.rs b/crates/db/src/rdb/relbox.rs index 55386f47..c8387c13 100644 --- a/crates/db/src/rdb/relbox.rs +++ b/crates/db/src/rdb/relbox.rs @@ -12,7 +12,7 @@ // this program. If not, see . // -// TODO(rdaum): 'join' and transitive closure on db relations +// TODO(): 'join' and transitive closure on db relations // -> datalog-style variable unification // can be used for some of the inheritance graph / verb & property resolution activity done manually now diff --git a/crates/db/src/rdb/tx/transaction.rs b/crates/db/src/rdb/tx/transaction.rs index 8075400f..c0253d5b 100644 --- a/crates/db/src/rdb/tx/transaction.rs +++ b/crates/db/src/rdb/tx/transaction.rs @@ -678,7 +678,7 @@ mod tests { assert_same(&tuples, &items); } - // TODO(rdaum): More tests for transaction.rs and transactions generally + // TODO(): More tests for transaction.rs and transactions generally // Loom tests? Stateright tests? // Test sequences & their behaviour // Consistency across multiple relations diff --git a/crates/db/tests/worldstate_restore.rs b/crates/db/tests/worldstate_restore.rs index 40a34395..af106dc1 100644 --- a/crates/db/tests/worldstate_restore.rs +++ b/crates/db/tests/worldstate_restore.rs @@ -84,7 +84,7 @@ mod test { tx.commit().unwrap(); db.shutdown(); - // TODO(rdaum): Sleep in "worldstate_restore" test should not be necessary. + // TODO(): Sleep in "worldstate_restore" test should not be necessary. // code smell. std::thread::sleep(Duration::from_millis(100)); a diff --git a/crates/kernel/src/builtins/bf_list_sets.rs b/crates/kernel/src/builtins/bf_list_sets.rs index acf19ba9..44c96dd9 100644 --- a/crates/kernel/src/builtins/bf_list_sets.rs +++ b/crates/kernel/src/builtins/bf_list_sets.rs @@ -301,7 +301,7 @@ fn do_re_match(bf_args: &mut BfCallState<'_>, reverse: bool) -> Result) -> Result { - // TODO(rdaum): Remove bf_noop panic + // TODO(): Remove bf_noop panic // right now we panic on unimplemented builtins, but we should just return an error and log, // this was done this way to support discovering which builtins are unimplemented, but // that's not really necessary anymore. @@ -353,7 +353,7 @@ fn bf_server_version(bf_args: &mut BfCallState<'_>) -> Result { if !bf_args.args.is_empty() { return Err(E_INVARG); } - // TODO(rdaum): Support server version flag passed down the pipe, rather than hardcoded + // TODO(): Support server version flag passed down the pipe, rather than hardcoded // This is a placeholder for now, should be set by the server on startup. But right now // there isn't a good place to stash this other than WorldState. I intend on refactoring the // signature for BF invocations, and when I do this, I'll get additional metadata on there. @@ -752,7 +752,7 @@ fn bf_listeners(bf_args: &mut BfCallState<'_>) -> Result { return Err(E_INVARG); } - // TODO(rdaum): Return something better from bf_listeners, rather than hardcoded value + // TODO(): Return something better from bf_listeners, rather than hardcoded value // this function is hardcoded to just return {{#0, 7777, 1}} // this is on account that existing cores expect this to be the case // but we have no intend of supporting other network listener magic at this point diff --git a/crates/kernel/src/builtins/bf_verbs.rs b/crates/kernel/src/builtins/bf_verbs.rs index daab6673..ef69562a 100644 --- a/crates/kernel/src/builtins/bf_verbs.rs +++ b/crates/kernel/src/builtins/bf_verbs.rs @@ -367,7 +367,7 @@ fn bf_verb_code(bf_args: &mut BfCallState<'_>) -> Result { return Err(E_TYPE); } - // TODO(rdaum): bf_verbs: fully-paren and indent options. For now we ignore these. + // TODO(): bf_verbs: fully-paren and indent options. For now we ignore these. // Retrieve the binary for the verb. let verb_info = bf_args @@ -642,7 +642,7 @@ fn bf_disassemble(bf_args: &mut BfCallState<'_>) -> Result { disassembly.push(v_string(format!("{: >3}: {}", i, v))); } - // TODO(rdaum): dump fork vectors in program disassembly stream + // TODO(): dump fork vectors in program disassembly stream // Display main vector (program); opcodes are indexed by their offset disassembly.push(v_str("OPCODES:")); diff --git a/crates/kernel/src/tasks/command_parse.rs b/crates/kernel/src/tasks/command_parse.rs index 6493b258..4039d934 100644 --- a/crates/kernel/src/tasks/command_parse.rs +++ b/crates/kernel/src/tasks/command_parse.rs @@ -162,7 +162,7 @@ where ] .contains(&verb.as_str()) { - // TODO(rdaum): Handle built-in commands like .program, .flush, etc. + // TODO(): Handle built-in commands like .program, .flush, etc. return Err(ParseCommandError::UnimplementedBuiltInCommand); } // Split into verb and argument string diff --git a/crates/kernel/src/tasks/scheduler.rs b/crates/kernel/src/tasks/scheduler.rs index 1e93d2ac..8cb0f49c 100644 --- a/crates/kernel/src/tasks/scheduler.rs +++ b/crates/kernel/src/tasks/scheduler.rs @@ -508,7 +508,7 @@ impl Scheduler { // Look for tasks that need to be woken (have hit their wakeup-time), and wake them. // Or tasks that need pruning. - // TODO(rdaum): Improve scheduler "tick" and "prune" logic. It's a bit of a mess. + // TODO(): Improve scheduler "tick" and "prune" logic. It's a bit of a mess. // we might be able to use a vector of delay-futures for this instead, and just poll // those using some futures_util magic. std::thread::Builder::new() @@ -1171,7 +1171,7 @@ impl Scheduler { // We reject this outright if the sender permissions are not sufficient: // The either have to be the owner of the task (task.programmer == sender_permissions.task_perms) // Or they have to be a wizard. - // TODO(rdaum): Verify kill task permissions is right + // TODO(): Verify kill task permissions is right // Will have to verify that it's enough that .player on task control can // be considered "owner" of the task, or there needs to be some more // elaborate consideration here? @@ -1362,7 +1362,7 @@ impl Scheduler { .world_state_source() .expect("Unable to instantiate database"); - // TODO(rdaum): support a queue-size on concurrent executing tasks and allow them to sit in an + // TODO(): support a queue-size on concurrent executing tasks and allow them to sit in an // initially suspended state without spawning a worker thread, until the queue has space. // Spawn the task's thread. let task_state_source = state_source.clone(); diff --git a/crates/kernel/src/tasks/sessions.rs b/crates/kernel/src/tasks/sessions.rs index 22daa6be..657961ec 100644 --- a/crates/kernel/src/tasks/sessions.rs +++ b/crates/kernel/src/tasks/sessions.rs @@ -31,7 +31,7 @@ use uuid::Uuid; /// /// Implementations would live in the 'server' host (e.g. websocket connections or repl loop) /// -// TODO(rdaum): Fix up connected/reconnected/discconnected handling. +// TODO(): Fix up connected/reconnected/discconnected handling. // Will probably deprecate MOO's concept of 'disconnected' and 'connected' players in the long // run and emulate slack, discord, skype, etc which have a concept of 'presence' (online, offline, // away, etc) but keep a persistent virtual history. Challenge would be around making this work diff --git a/crates/kernel/src/tasks/task.rs b/crates/kernel/src/tasks/task.rs index 6451ab9b..a1781ca5 100644 --- a/crates/kernel/src/tasks/task.rs +++ b/crates/kernel/src/tasks/task.rs @@ -149,7 +149,7 @@ impl Task { task_control_receiver: Receiver, control_sender: Sender<(TaskId, SchedulerControlMsg)>, ) { - // TODO(rdaum): Defer task delay to the scheduler, and let it handle the delay? + // TODO(): Defer task delay to the scheduler, and let it handle the delay? // Instead of performing it in the task startup. if let Some(delay) = delay_start { std::thread::sleep(delay); @@ -447,7 +447,7 @@ impl Task { // conform with MOO's expectations. // However a conflict-retry here is maybe not the best idea here, I think. // So we'll just panic the task (abort) if we can't commit for now. - // TODO(rdaum): Should tasks that throw exception always commit? + // TODO(): Should tasks that throw exception always commit? // Right now to preserve MOO semantics, we do. // We may revisit this later and add a user-selectable mode for this, and // evaluate this behaviour generally. @@ -718,4 +718,4 @@ fn find_verb_for_command( Ok(None) } -// TODO(rdaum): Unit tests for scheduler and tasks. +// TODO(): Unit tests for scheduler and tasks. diff --git a/crates/kernel/src/tasks/task_messages.rs b/crates/kernel/src/tasks/task_messages.rs index 3dc4e6bb..f705513c 100644 --- a/crates/kernel/src/tasks/task_messages.rs +++ b/crates/kernel/src/tasks/task_messages.rs @@ -64,7 +64,7 @@ pub enum TaskControlMsg { /// to resume execution, using the given world state (transaction) to do so. ResumeReceiveInput(Arc, String), /// The scheduler is asking the task to describe itself. - /// TODO(rdaum): Rethink task 'description' mechanism. + /// TODO(): Rethink task 'description' mechanism. /// Causes deadlock if the task _requesting_ the description is the task being /// described, so I need to rethink this. Right now this is prevented by the /// runtime, but it's not a good design. diff --git a/crates/kernel/src/textdump/read.rs b/crates/kernel/src/textdump/read.rs index 40635b74..993780c8 100644 --- a/crates/kernel/src/textdump/read.rs +++ b/crates/kernel/src/textdump/read.rs @@ -182,7 +182,7 @@ impl TextdumpReader { ))) } } - // TODO(rdaum): handle "recycled" flag in textdump loading. + // TODO(): handle "recycled" flag in textdump loading. let oid_str = &ospec[1..]; let Ok(oid) = oid_str.trim().parse() else { return Err(TextdumpReaderError::ParseError(format!( diff --git a/crates/kernel/src/textdump/write.rs b/crates/kernel/src/textdump/write.rs index 4db31c74..b6b5f4a6 100644 --- a/crates/kernel/src/textdump/write.rs +++ b/crates/kernel/src/textdump/write.rs @@ -148,7 +148,7 @@ impl TextdumpWriter { } self.write_verbs(&textdump.verbs)?; - // TODO(rdaum): Suspended tasks, clocks, queued tasks in textdump write + // TODO(): Suspended tasks, clocks, queued tasks in textdump write // actually write clocks/tasks/suspended tasks, but for now we just write 0 for each writeln!(self.writer, "0 clocks")?; writeln!(self.writer, "0 queued tasks")?; diff --git a/crates/kernel/src/vm/exec_state.rs b/crates/kernel/src/vm/exec_state.rs index f3214a37..cc7cb0e8 100644 --- a/crates/kernel/src/vm/exec_state.rs +++ b/crates/kernel/src/vm/exec_state.rs @@ -67,7 +67,7 @@ impl VMExecState { let verb_name = activation.verb_name.clone(); let definer = activation.verb_definer(); let player = activation.player; - // TODO(rdaum): Line numbers in 'callers' stack is not implemented + // TODO(): Line numbers in 'callers' stack is not implemented // Should be possible now that we have decompilation let line_number = 0; let this = activation.this; diff --git a/crates/kernel/src/vm/vm_execute.rs b/crates/kernel/src/vm/vm_execute.rs index 0bc07d87..1805a16e 100644 --- a/crates/kernel/src/vm/vm_execute.rs +++ b/crates/kernel/src/vm/vm_execute.rs @@ -258,7 +258,7 @@ impl VM { let (from, next_val) = { let (to, from) = f.peek2(); - // TODO(rdaum): Handling for MAXINT/MAXOBJ in various opcodes + // TODO(): Handling for MAXINT/MAXOBJ in various opcodes // Given we're 64-bit this is highly unlikely to ever be a concern for us, but // we also don't want to *crash* on obscene values, so impl that here. @@ -344,7 +344,7 @@ impl VM { return self.push_error(state, E_TYPE); }; - // TODO(rdaum): quota check SVO_MAX_LIST_CONCAT -> E_QUOTA in list add and append + // TODO(): quota check SVO_MAX_LIST_CONCAT -> E_QUOTA in list add and append let result = list.push(tail); f.poke(0, result); } diff --git a/crates/kernel/src/vm/vm_test.rs b/crates/kernel/src/vm/vm_test.rs index d46ce8d8..36546846 100644 --- a/crates/kernel/src/vm/vm_test.rs +++ b/crates/kernel/src/vm/vm_test.rs @@ -505,7 +505,7 @@ mod tests { #[test] fn test_regression_catch_issue_23() { - // https://github.com/rdaum/moor/issues/23 + // https://github.com//moor/issues/23 let program = r#"try 5; except error (E_RANGE) return 1; endtry for x in [1..1] return 5; endfor"#; let mut state = world_with_test_program(program); diff --git a/crates/rpc-common/src/lib.rs b/crates/rpc-common/src/lib.rs index 250603f6..96ab9ccd 100644 --- a/crates/rpc-common/src/lib.rs +++ b/crates/rpc-common/src/lib.rs @@ -149,5 +149,5 @@ pub enum BroadcastEvent { /// current time. This could be used in the future to synchronize event times, but isn't currently /// used.) PingPong(SystemTime), - // TODO(rdaum): Shutdown, Broadcast BroadcastEvent messages in RPC layer + // TODO(): Shutdown, Broadcast BroadcastEvent messages in RPC layer } diff --git a/crates/values/src/model/match.rs b/crates/values/src/model/match.rs index 14535c45..a7748876 100644 --- a/crates/values/src/model/match.rs +++ b/crates/values/src/model/match.rs @@ -62,7 +62,7 @@ impl ArgSpec { /// The set of prepositions that are valid for verbs, corresponding to the set of string constants /// in `PREP_LIST`, and for now at least much 1:1 with `LambdaMOO`'s built-in prepositions, and /// are referred to in the database. -/// TODO(rdaum): Refactor/rethink preposition list/enum. +/// TODO(): Refactor/rethink preposition list/enum. /// Long run a proper table with some sort of dynamic look up and a way to add new ones and /// internationalize and so on. #[repr(u16)] diff --git a/crates/values/src/model/mod.rs b/crates/values/src/model/mod.rs index 16f3ec1b..41cc6a27 100644 --- a/crates/values/src/model/mod.rs +++ b/crates/values/src/model/mod.rs @@ -149,7 +149,7 @@ pub struct NarrativeEvent { pub enum Event { /// The typical "something happened" descriptive event. TextNotify(String), - // TODO(rdaum): Other Event types on Session stream + // TODO(): Other Event types on Session stream // other events that might happen here would be things like (local) "object moved" or "object // created." } diff --git a/crates/values/src/model/objset.rs b/crates/values/src/model/objset.rs index 08eedd36..eec9b096 100644 --- a/crates/values/src/model/objset.rs +++ b/crates/values/src/model/objset.rs @@ -46,7 +46,7 @@ impl AsByteBuffer for ObjSet { } fn from_sliceref(bytes: SliceRef) -> Result { - // TODO(rdaum): Validate object ids on decode of ObjSet + // TODO(): Validate object ids on decode of ObjSet Ok(Self(bytes)) } diff --git a/crates/values/src/model/propdef.rs b/crates/values/src/model/propdef.rs index a244fca8..20565b19 100644 --- a/crates/values/src/model/propdef.rs +++ b/crates/values/src/model/propdef.rs @@ -142,7 +142,7 @@ impl AsByteBuffer for PropDef { } fn from_sliceref(bytes: SliceRef) -> Result { - // TODO(rdaum): Validate propdef on decode + // TODO(): Validate propdef on decode Ok(Self::from_bytes(bytes)) } diff --git a/crates/values/src/model/verbdef.rs b/crates/values/src/model/verbdef.rs index 90b8fdee..c9818e0b 100644 --- a/crates/values/src/model/verbdef.rs +++ b/crates/values/src/model/verbdef.rs @@ -188,7 +188,7 @@ impl AsByteBuffer for VerbDef { } fn from_sliceref(bytes: SliceRef) -> Result { - // TODO(rdaum): Validate VerbDef on decode + // TODO(): Validate VerbDef on decode Ok(Self::from_bytes(bytes)) } diff --git a/crates/values/src/model/world_state.rs b/crates/values/src/model/world_state.rs index b6829eb7..1f0ecc96 100644 --- a/crates/values/src/model/world_state.rs +++ b/crates/values/src/model/world_state.rs @@ -37,7 +37,7 @@ use crate::var::Var; /// commit any changes to the world at the end of the transaction, or be capable of rolling back /// on failure. pub trait WorldState { - // TODO(rdaum): Combine worlstate owner & flags check into one call, to make perms check more efficient + // TODO(): Combine worlstate owner & flags check into one call, to make perms check more efficient /// Get the set of all objects which are 'players' in the world. fn players(&self) -> Result; diff --git a/crates/values/src/var/list.rs b/crates/values/src/var/list.rs index a0f720de..8d374c4c 100644 --- a/crates/values/src/var/list.rs +++ b/crates/values/src/var/list.rs @@ -24,7 +24,7 @@ use crate::var::{v_empty_list, Var}; #[derive(Clone, Debug, Encode, Decode, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct List { - // TODO(rdaum): Implement our own zero-copy list type and get rid of bincoding + // TODO(): Implement our own zero-copy list type and get rid of bincoding // To support nested content, would require an offsets table at the front, etc. // Take a look at how flatbufers, capnproto, and other zero-copy serialization formats do this. inner: Arc>, diff --git a/crates/values/src/var/varops.rs b/crates/values/src/var/varops.rs index 8db7868d..94d1f686 100644 --- a/crates/values/src/var/varops.rs +++ b/crates/values/src/var/varops.rs @@ -76,7 +76,7 @@ impl Var { /// 1-indexed position of the first occurrence of `v` in `self`, or `E_TYPE` if `self` is not a /// list. - // TODO(rdaum): Make Var consistent on 0-indexing vs 1-indexing + // TODO(): Make Var consistent on 0-indexing vs 1-indexing // Various places have 1-indexing polluting the Var API, but in others we // assume 0-indexing and adjust in the opcodes. 0 indexing should be done in Var, and opcodes and builtins // should be the ones to adjust 1-indexing. diff --git a/crates/web-host/src/client/browser.html b/crates/web-host/src/client/browser.html index 8c820c3e..50e09b17 100644 --- a/crates/web-host/src/client/browser.html +++ b/crates/web-host/src/client/browser.html @@ -442,13 +442,13 @@
- + Permissions: - + Owner: - + Arguments: - + Names: diff --git a/crates/web-host/src/client/editor.js b/crates/web-host/src/client/editor.js index d933f448..0c5b028c 100644 --- a/crates/web-host/src/client/editor.js +++ b/crates/web-host/src/client/editor.js @@ -12,7 +12,7 @@ // this program. If not, see . // -// TODO(rdaum): MOO syntax highlighting format validation +// TODO(): MOO syntax highlighting format validation // what exists in editor.js is just a first crack at this, it's by no means complete. const MooSyntax= { // Set defaultToken to invalid to see what you do not tokenize yet @@ -131,7 +131,7 @@ const MooSyntax= { }; -// TODO(rdaum): editor.js: completion provider which works to lookup verbs / props for constant $references and #object_ids +// TODO(): editor.js: completion provider which works to lookup verbs / props for constant $references and #object_ids function createEditor(editor_element) { editor_element.innerHTML = ""; diff --git a/crates/web-host/src/client/root.html b/crates/web-host/src/client/root.html index 83fd560d..d5d35aae 100644 --- a/crates/web-host/src/client/root.html +++ b/crates/web-host/src/client/root.html @@ -83,7 +83,7 @@ if (result.ok) { console.log("Connected!"); } else { - // TODO(rdaum): Web ui login rejection / authentication rejection + // TODO(): Web ui login rejection / authentication rejection // we will need to capture the rejection message from the server somehow, and display it. // Right now this is not possible through the existing LoginRequest/LoginResponse mechanism. // Also this alert() thing is ugly, we'll want to replace it with something more UI consistent. @@ -123,7 +123,7 @@ let narrative = document.getElementById("narrative"); narrative.style.display = "inherit"; - // Enable the browser launcher (TODO(rdaum): Browser in web ui should only be for programmers) + // Enable the browser launcher (TODO(): Browser in web ui should only be for programmers) let browser_launcher = document.getElementById("launch_browser"); browser_launcher.style.display = ""; browser_launcher.addEventListener("click", function () {