{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":563529801,"defaultBranch":"master","name":"lady-deirdre","ownerLogin":"Eliah-Lakhin","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2022-11-08T20:02:07.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/223986?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1705016056.0","currentOid":""},"activityList":{"items":[{"before":"3466be84d0a5477219648f5cc41496133c638653","after":"8d182c7475e21460d06888990376dcff1156bc38","ref":"refs/heads/version-2","pushedAt":"2024-04-04T09:44:23.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Various improvements and fixes\n\n - VoidFeature object added, which is a Feature that is never resolving to any value.\n - SharedComputable helper trait added that computes Shared object, and autoimplements Computable trait for this Shared object.\n - Handle interface that consists of two latches.\n - ParseTree interface moved to syntax module.\n - ParseTree::well_formed() function added that tells if the tree is well-formed from the parser point of view.\n - ParseError::Error variant replaced with the ParseNode::well_formed flag.\n - ImmutableSyntaxTree receives dedicated ObservableSyntaxSession when the observer specified.\n - Analyzer's cycle detection mechanism (that was buggy) replaced with timeouts lock timeouts that eventually fail on cycles.\n - The Analyzer, in turn, can never deadlock due to attributes misconfiguration.\n - In case of the wasm build targets timeouts are disabled, and the lock situation leads to timeout errors instantly.\n - AnalyzerConfig introduced that configures timeouts and single-document optimization flag.\n - AnalysisError::is_interrupt renamed to is_abnormal that takes into account timeout error.\n - Exclusive task acquiring bug fixed.\n - PrittyPrintConfig from now on is non-exhaustive.\n - PrintString interface removed in favor to owned Strings and the Cow whenever applicable.\n - Delimited interface removed.\n - Token::LOOKBACK constant parameter introduced that specifies the minimum number of characters the lexical re-parse should take into account when the user edits the code.\n - The Token macro sets this parameter to 1 by default (that corresponds to the previous implementation), but provides a way to set the value manually through the #[lookback(expr)] attribute.","shortMessageHtmlLink":"Various improvements and fixes"}},{"before":"48509c4496bf2eb64fdc1ce1a89b3a7f12063723","after":"3466be84d0a5477219648f5cc41496133c638653","ref":"refs/heads/version-2","pushedAt":"2024-02-02T06:41:07.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"ParseTree interface and PrettyPrinter improvements\n\nThe main goal of the format::ParseTree is to equip an API user with the source code full reconstruction capabilities when desgining a source code formatter.\n\n - This interface builds a tree of hierarchical parse segments (based on the Node parser) that fully covers original source code.\n - In particular this interface does not skip blank tokens, comment nodes and the tokens that may be ommited during the normal syntax tree building.\n - The interface associates each parse segment with the syntax node describing syntax meaning of the segment.\n - The ParseTree classifies each segment as a Node segment (covers a syntax node), or a Token segment (covers individual token), or a Blank segment (that combines adjacent whatspaces and line breaks), or an Error segment to let an API user discover if the parent segment is well-formed or not.\n - Each parse segment tracks precomputed site and position spans.\n - Parse segment objects own their children which simplifies tree traverse.\n\nOther changes:\n\n - PrettyPrinter no longer relays on the PrintString interface. Instead, the public functions of the PrettyPrinter from now on accept just normal Strings.\n - In particular this change removes lifetime parameter from the PrettyPrinter.\n - PrettyPrinter::neverbreak function added that moves line breaks on the right from the token.\n - Observer interface from now on tracks tokens and node lifts too.\n - Position implements Hash.","shortMessageHtmlLink":"ParseTree interface and PrettyPrinter improvements"}},{"before":"d8086c70f6faed57aba51957aa2e465d08ceab51","after":"48509c4496bf2eb64fdc1ce1a89b3a7f12063723","ref":"refs/heads/version-2","pushedAt":"2024-01-17T20:49:22.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Nodes classification and events\n\nThis commit introduces two new features to the analysis infrastructure:\n\n 1. Node classifier. An API user can specify a function that assigns syntax nodes arbitrary classes, and then to fetch all nodes belong to specific class. The analyzer will be responsible to keep the classes in sync with the syntax tree mutations, and to invalidate corresponding attributes whenever the classes these attributes depends on being updated. The user is capable to customize the classifier function and the class type as well.\n\n 2. Document-wide and project-wide events. The analyzer provides an API for the user to trigger custom numeric project-wide and/or document-specific events during mutation. Attributes, in turn, can subscribe to these events, and the analyzer will invalidate these attributes whenever corresponding events being triggered. In particular the analyzer uses this mechanism to trigger a few built-in events, such as documents creation/updating/deletion events, and the parse error events.\n\nThe first feature opens a possibility for an API user to make indices of arbitrary nodes. For example, the user can index variable references or some other semantic-specific features across the entire document. This change makes previously introduced \"scope snapshots\" feature obsolete as the user is capable to index them manually.\n\nThe second feature opens a possibility to signal attributes about the external environment changes such as the project-wide configuration changes or the changes in the external state. And it also provides an additional mechanism for the internal changes signaling as well. In particular the analyzer triggers document parse error event for particular document whenever the parse errors state changes being detected. This feature, in turn, makes previously introduced \"error snapshots\" feature obsolete.\n\nThis commit also changes the attributes invalidation mechanism. From now on the analyzer does not invalidate node semantics on each node update. Instead it only invalidates the ScopeAttr (to keep scopes in sync with the syntax tree) and the affected scope node's semantics. It is assumed that the user is fully responsible to keep attributes graph up to date based on the scoped nodes subtree changes as the key synchronization points.\n\nAPI changes:\n\n - New Grammar::Classifier associated type of the new Classifier trait type introduced.\n - The Classifier trait requires just one customizable function that should return a set of all classes of particular node.\n - Classifier::Class associated type is also customizable. The user can pick any custom type for classes as long as the type eligible to the HashSet item requirements.\n - An API user customizes Classifier in the Node derive macro using the new \"#[classifier(...)]\" attribute.\n - By default the derive macro sets the classifier to the VoidClassifier that does not classify any syntax node.\n - scope_attr() function is no longer a part of the Feature trait.\n - From now on the ScopeAttr will be inseparable part of the Semantics interface. Every initialized Semantics objects have a ScopeAttr. As such the scopes tracking will be infallible.\n - Hence AnalysisError::MissingScope error variant has been removed, and the new AnalysisError::MissingSemantics variant has been added.\n - The Node derive macro from now on introduces a new requirement such that if any parsable node variant has #[semantics] field, the rest of the variants must specify similar field as well. This change will protect the user from the grammar configuration mistakes.\n - Similar requirements has been added for the #[parent] and #[node] macro attributes.\n - Feature derive macro's #[invalidate] attribute renamed to #[scoped]. The aim of this attribute is to label scope-wide semantic features of the scoped nodes.\n - Feature derive macro's #[scope] attribute removed as the user no longer needs to put ScopeAttrs inside Features.\n - Grammar::has_scopes() function removed.\n - Grammar::initialize() and Feature::initialize() functions renamed to \"init\".\n - FeatureInitializer renamed to Initializer; FeatureInvalidator renamed to Invalidator.\n - \"snapshot_scopes\" and \"snapshot_errors\" functions both removed from the AbstractTask and AttrContext interfaces.\n - AbstractTask::snapshot_class function added to snapshot particular node set that belongs to specified class.\n - AttrContext::read_class function added that also snapshots class's node set, and subscribes corresponding attribute to the class changes.\n - AttrContext::subscribe function added that subscribes the attribute to specified event (either document specific or project's wide).\n - MutationAccess::trigger_event function added to manually trigger specified event during mutation.\n - AttrContext::try_read_doc function removed, because the user can manually check for the document existance (the documents cannot be removed in between during analysis).\n - sync::Accumulator interface removed from the code base.\n - analysis::Lifecycle and analysis::Signal interfaces removed from the code base.\n - Table::with_capacity_and_hasher_and_shards new constructor function has been added.\n - This function, in particular, allows creation of the single-shard Tables.\n - AttrRef::invalidate from now on accepts MutationAccess interface instead of the MutationTask object.\n - AnalysisError::MissingFeature wrong display message fixed.\n - syntax::VoidObserver interface exposed.","shortMessageHtmlLink":"Nodes classification and events"}},{"before":"e0ea35de6f240d18fa34d7c3a8bd22f1388df013","after":"d8086c70f6faed57aba51957aa2e465d08ceab51","ref":"refs/heads/version-2","pushedAt":"2024-01-12T22:04:44.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Cluster interface removed\n\nThis commit removes Cluster interface and all things related to clusters in the public API.\n\nUntil now the Cluster interface provided a possibility to change syntax tree manually, however in the current design such capabilities are almost useless as the Analyzer does not expose them.\n\nAnother purpose of the Cluster was public representation of the MutableUnit inner caches, which in fact is an implementation detail, and should have been encapsulated from the beginning. Having this interface in the public API complicates the entire design of the project and imposes unnecessary complexity.\n\nThe drawback of this change is that an API user is no longer able to restructure syntax tree manually. However the commit kept inner algorithms intact. As such, if needed, this feature could be returned back in the future versions in more concise way.\n\nChanges in the \"arena\" module:\n\n - Entry object simplified. From now on it only stores index and version.\n - The \"Primary\" variant is no longer expressed within Entry as the primary entries removed from the public API design alongside with Clusters.\n - Repository renamed to Repo. It's interface and implementation adjusted to mimic necessary commit-wide changes.\n - In particular Repo version starts with 1.\n - As such Entries with version 0 encode indexed data outside of repositories.\n - Entries with index and version set to max values express Nil entries.\n - Sequence object removed. An API encouraged to use just normal std Vec objects instead.\n\nChanges in the \"syntax\" module:\n\n - Cluster interface removed.\n - NodeRef's and ErrorRef's \"cluster_entry\" field removed.\n - All cluster operations related to NodeRef and ErrorRef removed.\n - All operations in the SyntaxTree trait related to clusters removed.\n - Node and Error objects access function added to the SyntaxTree trait.\n - SyntaxTree::NodeIterator and SyntaxTree::ErrorIterator associated types added.\n - These traits assume to expose iterators over the NodeRefs and ErrorRefs respectively and are implementation dependent.\n - In general nodes and errors iteration became more trivial procedure as both types of objects from now on stored in flat collections under the hood of the Mutable and Immutable units.\n - SyntaxBuffer renamed to ImmutableSyntaxTree.\n\nChanges in the \"units\" module:\n - MutableUnit internal implementation no longer depends on the previous Cluster interface.\n - The internal algorithm kept almost intact, and the unit still operates with node caches under the hood. However the nodes and the eroors are stored aside from the storage tree in flat Repo collections.\n\nAmong other things these changes fix a problem with the root's leftmost nodes caching. Previously they have been treated as secondary nodes regardless of their caching capabilities. From now on they will be cached properly.\n\nAlso this set of changes slightly improves MutableUnit performance.","shortMessageHtmlLink":"Cluster interface removed"}},{"before":"f75e14744a947626b4e8f0d1475931a2b39b2400","after":null,"ref":"refs/heads/reference-system-refactoring","pushedAt":"2024-01-11T23:34:16.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"}},{"before":null,"after":"f75e14744a947626b4e8f0d1475931a2b39b2400","ref":"refs/heads/reference-system-refactoring","pushedAt":"2024-01-11T23:33:35.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"bugfix","shortMessageHtmlLink":"bugfix"}},{"before":"98b38c3f5f406d1ba96815d464649b581fd87ac5","after":"e0ea35de6f240d18fa34d7c3a8bd22f1388df013","ref":"refs/heads/version-2","pushedAt":"2024-01-10T19:28:21.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"MutableUnit's watch interface refactoring\n\n - WatchReport object replaced with Watch trait.\n - The incremental re-parser reports changes in the affected clusters by calling Watch functions directly, and the implementer of the interface decides how to manage them in place. e.g. the implementation can ignore them completely (default behavior), or to put into inner collections for later analysis.\n - An API user calls new MutableUnit::write_and_watch function with additional `&mut impl Watch` parameter.\n - From now on this new watch mechanism not only reports objects creations and updates, but also objects deletions (this applied to nodes and parse errors both).\n\nThis set of changes in particular fixes a bug in the Analyzer when the Analyzer misses scopes deletion events.\n\nAlso the new interface opens a possibility to implement document-wide indices.","shortMessageHtmlLink":"MutableUnit's watch interface refactoring"}},{"before":"e6994e2d4f7e5d01f346110981ffc68d9f822245","after":"98b38c3f5f406d1ba96815d464649b581fd87ac5","ref":"refs/heads/version-2","pushedAt":"2024-01-08T11:37:30.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Parser observer interface\n\nNew syntax::Observer trait introduced that tracks parse rules bounds and parse errors during the non-incremental parsing.\n\nAmong other things this interface aims to collect comment nodes of the parse tree which is useful for building code formatters. Also the interface provides parser debugging capabilities. New Node::debug provided function tests node's syntax by parsing specified code snippet and printing parse rule bounds to terminal.\n\nThis commit also removes excessive analyzer tasks' lifetimes.","shortMessageHtmlLink":"Parser observer interface"}},{"before":"5e58cc799f55b6ea8fe6f53f7b2dfc4225d7a0b5","after":"e6994e2d4f7e5d01f346110981ffc68d9f822245","ref":"refs/heads/version-2","pushedAt":"2024-01-06T11:18:23.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Analyzer enhancements and fixes\n\nAmong other changes this commit fixes two severe bugs:\n\n - In the attributes validation algorithm that lead to deadlocks in some situations. To be more specific this fix introduces a check if the attribute verified early on before locking attribute's entry for write. This makes sense because the attribute's compute function could indirectly trigger validation procedure over that would stuck on this attribute during the fast-pass.\n - A bug in the TaskManager where the tasks incorrectly release their grants.\n\nTasks interface refactoring:\n\n - Analyzer's documents from now on can be access from the tasks only (including read access).\n - MutableTask object split into MutableTask and ExclusiveTask.\n - AnalysisAccess and MutationAccess interfaces introduced. These traits provide analysis/mutation access to the documents. And the AnalysisTask, MutationTask and ExclusiveTask simply implement these traits depending on their access level.\n - From now on AnalysisTask takes attribute's snapshots (by cloning their values) rather than locking them for reading. As such the user is no longer able to keep attributes locked ouside of the validation procedure, and the attributes that needs to be observed from outside should implement Clone interface.\n\nMutations tracking enhancements:\n\n - MutableUnit mutations access interface replaced with simple WatchReport interface. This new interface owns vectors of mutations (rather than referring them as it was done previously).\n - An API user takes a snapshot of the currently accumulated mutations by calling MutableUnit::report() function. By calling of this function the user resets (cleans up) current MutableUnit accumulator.\n - An API user turns watch mode on/off using MutableUnit::watch() function.\n - MutableUnit::watches() returns boolean flag if MutableUnit is currently in watch mode (if the unit accumulates mutations).\n - On top of that WatchReport is capable to accumulate all new parse error objects (ErrorRefs) that being introduced during the parse sessions.\n - Analyzer from now on tracks Document's parse error refs and the scope node refs sets, and provides an interface to take a snapshot of all such refs known to the Analyzer.\n - Whenever the Analyzer detects changes in these sets, it triggers the root node's invalidation.\n\nThese changes covers most of the needs of the previously introduced Lifecycle/Accumulator interfaces. As such these interfaces is a subject for remove.\n\nOther changes:\n\n - AnalysisResultEx helper trait introduced. It's AnalysisResultEx::unwrap_abnormal() function unwraps all AnalysisErrors in place except the Interrupted error, since such errors assumed to be semantics design errors and needs to be reported as soon as possible in most cases.\n - SyntaxTree::root() function introduced that dereferences the root node in place.\n - Shared::addr() function exposed to the public interface.","shortMessageHtmlLink":"Analyzer enhancements and fixes"}},{"before":"5cede303be70945b29e43aace30ddc93f2bee981","after":"5e58cc799f55b6ea8fe6f53f7b2dfc4225d7a0b5","ref":"refs/heads/version-2","pushedAt":"2023-12-25T07:10:24.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Analyzer task manager refactoring.\n\nThis commit improves Analyzer's internal task manager:\n\n - New exclusive kind of task introduced. This task requires exclusive access to the Analyzer's state, but allows analysis and mutation (sequential) operations both.\n - Also the new task manager handles access more transparently, and the user obtains a way to cancel any kind of tasks (including mutation tasks).\n - The Analyzer from now on checks for duplicate user-provided latches.\n - AnalysisTask have been splitted into AnalysisTask and AttrContext, so that the user can query attributes without mutable access to the AnalysisTask. However, this splitting was a controversial decision by many reasons, and the current interface is a subject for futher improvements.\n\nOther changes:\n - AttrReadGuard provides a way to get attributes latest updated-on revision.\n - TerminalString::sanitize function introduced that clears out all CSI sequences.\n - Position::to_site edge-case bug fixed.\n - PrintString::into_owned function introduced.","shortMessageHtmlLink":"Analyzer task manager refactoring."}},{"before":"eac58e3ff6bd72d113442fc5d30e4aa2484f3cb3","after":"5cede303be70945b29e43aace30ddc93f2bee981","ref":"refs/heads/version-2","pushedAt":"2023-12-22T10:25:34.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"New LineIndex interface.\n\n - This commit introduces new LineIndex interface that tracks spans of the source code lines.\n - New SourceCode::lines() function returns a reference to the compilation unit's LineIndex.\n - An API user can query Line spans, lengths, and Site's lines through this interface.\n - ToPosition and ToSite interfaces from now on use LineIndex interface for fast O(1) conversion between Sites and Positions.\n - Position encoding has been changed in this commit. Line 0 encodes first line as well as the Line 1 (previously Line 0 refers the beginning of the code regardless of the Column value). Also Position object encoding from now on includes caret break character (line ending).\n\nThis change improves system performance when Position objects used frequently to address source code spans, however overall incremental parsing/reparsing has been degrade because the underlying compilation units have to keep LineIndex up to date. There is a space to improve this initial implementation of the LineIndex. Also, maybe LineIndex will become an optional feature in the future version.","shortMessageHtmlLink":"New LineIndex interface."}},{"before":"42f7bc057369643cad1ce77c8bc9fc502d9aa256","after":"eac58e3ff6bd72d113442fc5d30e4aa2484f3cb3","ref":"refs/heads/version-2","pushedAt":"2023-12-21T08:15:22.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Char iteration optimizations.\n\n - SourceCode::chars from now on returns custom iterator (SourceCode::CharIterator).\n - This iterator should be specialized per each SourceCode implementation.\n - MutableUnit and TokenBuffer provide their own specializations that significantly improve char iteration performance in general.\n - In particular this change improves Position to/from Site conversions as their inner algorithm currently relies on the char iteration which is O(n).\n - `lexis::CharIter` interface removed.\n - This commit also improves TokenBuffer::substring implementation. From now on TokenBuffer always returns borrowed substring and works much faster.\n\nThis commit also fixes TokenBuffer's length calculation. Previously there was a bug related to the TokenBuffer::append function.","shortMessageHtmlLink":"Char iteration optimizations."}},{"before":"0856004bcd7cb05f106e2327d8279654456189f8","after":"42f7bc057369643cad1ce77c8bc9fc502d9aa256","ref":"refs/heads/version-2","pushedAt":"2023-12-20T13:36:21.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Semantic scopes invalidation mechanism and side effects tracking\n\n - MutationTask::write_to_document function automatically invalidates scoped nodes when their own descendants mutate.\n - Signal and Lifetime interfaces introduced to the analysis module. They provide a way to track arbitrary objects life cycle events (initialization and desctruction).\n - In particular an API user can use these interfaces to track nodes of particular types (e.g. scoped nodes) and parse errors creation and destruction.\n - sync::Accumulator interface introduced. This synchronization primitive represents a mutex wrapper over the shared hash set under the hood.\n - An API user can add or remove items in the Accumulator, and to take a snapshot of the underlying hash set. This primitive tracks if the underlying tracked set of items was actually changed since the last snapshot.\n - One of the purpose of the Accumulator object and the Signal interface is to accumulate scoped nodes references set, and to perform arbitrary incremental semantic computations over the accumulated objects whenever their set is changing.\n\nOther changes:\n\n - Analyzer::*analyze functions from now on accept external Latch.\n - Various analysis functions return types changed from Option to AnalysisResult. This change makes more convenient of their use insude the attributes `compute` functions.\n - DocumentReadGuard receives AsRef implementation.\n - All macros receive new `#[dump(decl)]` mode. This mode erases all output spans. This feature provides a way to fix a problem when the user uses a procedural macros inside declarative macros (this is especially important for the Feature derive macros).\n - Various read functions receive try_* variants.\n - Analyzer::interrupt function added that interrupts all current in-progress analysis tasks.\n - Missing AttrReadGuard export fixed.\n - Table receives Default interface implementation.","shortMessageHtmlLink":"Semantic scopes invalidation mechanism and side effects tracking"}},{"before":"d8e409202f71d87d5740fb955ae507d6fb09c709","after":"0856004bcd7cb05f106e2327d8279654456189f8","ref":"refs/heads/version-2","pushedAt":"2023-12-13T00:31:25.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Node and related interfaces refactoring\n\n - AbstractNode subtrait introduced that covers all primary Node functions, but `parse`.\n - AbstractNode does not have Sized requirement, and is object-safe.\n - analysis::Grammar supertrait introduced that manages Node's former `initialize` and `invalidate` functions. Grammar assumed to describe nodes with semantics (lexis+syntax+semantics).\n - Node macros by default implements AbstractNode, Node, Grammar and AbstractFeature on the derived object.\n - Children and Child interfaces removed. From now on an API user obtains node's children using AbstractNode's functions directly.\n - Child interface replaced with Capture. It has similar structure and meaning, but the new naming more properly describes object's purpose.\n - AbstractNode::capture trait function returns particular captured field by string or numeric index.\n - AbstractNode::capture_keys trait function enumerates all available keys of a particular node.\n - New Key enum introduced that represents either a string or a numeric index.\n - AbstractFeature interface simplified to reflect AbstractNode design changes.\n - Some unused AnalysisError variants removed.\n - Token trait slightly changed to reflect AbstractNode design changes too.","shortMessageHtmlLink":"Node and related interfaces refactoring"}},{"before":"c91ec7f0198d103692a9c4b872e28f88243eeba4","after":"d8e409202f71d87d5740fb955ae507d6fb09c709","ref":"refs/heads/version-2","pushedAt":"2023-12-11T18:04:15.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Analyzer interface\n\n\"semantics\" module replaced with \"analysis\" module that provides unified framework for semantic analysis and managing of a set of interconnected Documents.\n\nAnalyzer interface introduced:\n\n - This object manages a set of configurable Document(s) that assume to represent a single compilable project, and their attributes database.\n - From now on an API user no longer have direct access to the semantics database, however the Analyzer object (that holds a database under the hood) is no longer required to be static. As such an API user can put Analyzer anywhere.\n - The Analyzer provides a read-only access to the managed documents and read-only access to already fetched attribute values, but to change the documents content or to fetch attributes values the user has to put the Analyzer to the mutation or analysis mode respectively.\n - To perform semantic analysis the user schedules Analysis task. Analysis tasks are cancallable.\n - To create, delete or write into Analyzer's documents or to invalidate particular attributes manually an API user schedules Mutation task which is non-cancellable.\n - There could be as many mutation or analysis tasks executed concurrently (e.g. executed in dedicated threads). But only one of their type may exist at any point in time, because the Analyzer is always exists in one of two modes.\n - Scheduling of mutation or analysis tasks may block if the Analyzer is currently in a different mode. However, scheduling of mutation tasks automatically triggers all current analysis tasks cancellation that gracefully shuts them down.\n - Analysis mode is default. When all mutation tasks are finished, they turn Analyzer back to analysis mode unblocking all analysis requests.\n\nThe general workflow of the attributes management was preserved, but several API changes have been made:\n\n - An API user no longer needs to instantiate attributes manually. This job performed by the Mutation task's mechanism under the hood by splitting attributes creation into two stages: instantiation and initialization. The user usually don't need to interact with these stages manually. For the external access all specified attributes will be observed as fully initialized.\n - An API user is either specified attributes directly on the syntax Nodes, or creates composite semantics objects that combine several attribute types together, and then specifies these composite custom objects on the syntax Nodes as well.\n - To work with attributes and composite semantics objects in uniform way this commit introduces several interfaces including the Feature trait. Attrs and the composite semantics objects implement Feature trait.\n - A new Feature derive macros was introduce to help the user defining new composite objects.\n - On top of that Semantics object was introduced that is a wrapper of the Feature instance, that puts underlying content under the Box.\n - All necessary changes to work with semantics features has been applied to the Node trait and the Node macros respectively. In particular new #[semantics] attribute has been introduced in the Node macros. An API user should use this label on the variants' fields that assume to represent node's semantics (an Attr or a composite object of other Attrs belong to this node).\n\nChanges in the attribute interface:\n - To read from the attribute the user specifies AnalysisTask that substitutes previously existed AttrContext.\n - From now on it is also possible to read from abstract AttrRef as well by specifying attribute's underlying type explicitly.\n - An API user no longer provides attribute's underlying type's compute function explicitly. Instead the user should implement a new Computable trait for the underlying type that contains \"compute\" function.\n - In general AttrRef from now on looks and feels more consistent with the rest of the *Ref objects.\n\nAttributes validation inner mechanism was also improved by splitting validation into fast and slow passes. This change should improve parallel attributes validation.\n\nOther changes:\n - \"compiler\" module was renamed to \"units\" module. Document is no longer exposed as a crate base objects, it is now reside under the units module.\n - `Latch::addr()` function becomes public.\n - `TokenBuffer`, `Document` and other compilable units from now on implement `From>` instead of `From>`. This change relaxes unnecessary restrictions.\n - Unit's write functions accept `impl Into>` as the text input.\n - Node and Token interfaces from now on required to be Send and Sync.\n - `sync::SyncBuildHasher` marker trait introduced that represents a simple standard BuildHasher similar to std's RandomState.","shortMessageHtmlLink":"Analyzer interface"}},{"before":"6705ca1d6511479edc09ced7fc06fb524b3eeea5","after":"c91ec7f0198d103692a9c4b872e28f88243eeba4","ref":"refs/heads/version-2","pushedAt":"2023-12-06T14:17:28.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Semantics analysis framework\n\nTwo new modules introduced: semantics and sync. Both are currently depend on std features, as such they are available under the \"std\" feature only.\n\nModule \"semantics\" introduces a framework for arbitrary incremental computations.\n\n - An API user creates an instance of `Db` (from \"database\") object that represents a set of interconnected functions and the caches of their outputs.\n - It is assumed that the user would need at most one Db instance per compilation project (per a set of Documents being compiled together).\n - The system of connections between Db functions should represent a directed acyclic graph.\n - A user adds new functions to the database using `Attr` interface (from \"attribute\").\n - The user can store instances of Attrs inside the Node variants (or inside the object associated with particular variants). Each Attr assume to infer arbitrary semantic information from the syntax tree subgraph associated with particular node variant, and from other Attrs outputs too.\n - By default the database does not perform any computations. The least amount of the Attr functions will be invoked by the inner mechanism of the database when the user observes (fetches) a value of particulat attribute.\n - This mechanism guarantees to keep attribute values up to date as long as the Attr functions don't have side effects (they don't read anything aside from other attribute values).\n - If the function has a side effect the user is responsible to notify the database about particular Attr invalidation event whenever corresponding outside data being updated.\n - In particular, updates in the syntax tree are side effects to the attributes. An API user can detect these changes from the Document mutations interface, and propagate them manually to the corresponding nodes.\n\nThis commit provides an early release of the semantic analysis framework which has a number of design flows to be addressed in the future.\n\nModule \"sync\" provides a set of synchronization data collections that could be useful in organizing of the compiler.\n\n - `Latch` represents a boolean flag that is initialized to \"false\" on creation, but could be set to \"true\" through any clone of this Latch instance. This interface semantically equals to \"Arc>\", but uses just a single atomic. An API user can use this instance, for example to notify threads to suspend computation extensive processes. In other words, this synchronization primitive is design for demand-driven multitasking.\n - `Lazy` represents a Send+Sync value being computed just once and on demand. The user can declare `static FOO: Lazy = ...;`, and then use `&'static T` everywhere throught the `Lazy::deref` interface. This object polifills not yet stabilized feature from Std.\n - `Shared` represents an alternative to the `Arc`, but without a weak counterpart. Also, Shared does not implement Deref interface. An API user access the underlying data more explicitly through the \"AsRef\" interface. This design decision makes Shared's own functions (such as `Shared::get_mut`) more convenient to use.\n - `Table` represents an alternative to the `HashMap` for concurrent access. The collection entries reside in the fixed amount of the Table's inner shards such that several threads would unlikely to compete when accessing distinct entries of the Table for read and write concurrently.\n\nOther changes:\n\n - Document mutations watches interface fixes and improvements.\n - Mutable and Immutable units constructor functions added.\n - `Repository::new` const constructor introduced.\n - `StartRef::start_of` and `end_of` public functions introduced.\n - From now on the user can create SiteRef object directly.\n - `ErrorRef` receives PartialOrd, Ord and Hash implementations.\n - `Id::debug` minor bug fixed.\n - Some fixes and imrpovements in the `Style` and `Snippet` interfaces.\n - Various collections receive iterator interfaces improvements.\n - Some fixes in the no-std mode.","shortMessageHtmlLink":"Semantics analysis framework"}},{"before":"36c7209446dc6ca122172d1963ebfa5ae39d6238","after":"6705ca1d6511479edc09ced7fc06fb524b3eeea5","ref":"refs/heads/version-2","pushedAt":"2023-11-05T02:32:00.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Id implements Identifiable interface","shortMessageHtmlLink":"Id implements Identifiable interface"}},{"before":"30b4dc50f68df648fe3f2d871ac8bb80985dcd40","after":"36c7209446dc6ca122172d1963ebfa5ae39d6238","ref":"refs/heads/version-2","pushedAt":"2023-10-28T02:05:09.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Ref objects Default implementation","shortMessageHtmlLink":"Ref objects Default implementation"}},{"before":"347e4b22c80e833aef06310684cb6bdf2fa65dfb","after":"30b4dc50f68df648fe3f2d871ac8bb80985dcd40","ref":"refs/heads/version-2","pushedAt":"2023-10-17T19:42:20.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"SiteRef::is_code_end function introduced; SiteRef::token_ref from now on returns a reference","shortMessageHtmlLink":"SiteRef::is_code_end function introduced; SiteRef::token_ref from now…"}},{"before":"c5fb091aa1745b8cacb4f77303dca5e7523d729b","after":"347e4b22c80e833aef06310684cb6bdf2fa65dfb","ref":"refs/heads/version-2","pushedAt":"2023-10-13T07:15:15.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Watching mutations bug fixed","shortMessageHtmlLink":"Watching mutations bug fixed"}},{"before":"a625738bb803a87b27d24b19a4f0f4f4cad55274","after":"c5fb091aa1745b8cacb4f77303dca5e7523d729b","ref":"refs/heads/version-2","pushedAt":"2023-09-28T17:09:00.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Error recovery and error reporting improvements\n\n - `SyntaxSession::attach_error` function renamed to `failure`. From now on this function does not register redundant error objects when the chain of the nested rules simultaneously fail in the same cursor position. In other words, this improvement reduces amount of excessive \"stacked\" parse error messages in favor to the most specific.\n - `SyntaxSession::attach_node` function renamed to `node` (for the naming consistency purposes).\n - `Recovery::recover` function from now on returns new `RecoveryResult` object that describes the recovery result more precisely.\n - A new field `recovery` (of the `RecoveryResult` type) introduced in the `ParseError` object. This field specifies the way how the error was generated, and it helps the error message generator.\n - A new function `Token::blanks` introduced that returns a `TokenSet` of all token rules of this grammar that describe the blank tokens(whitespaces, line breaks, etc). New attribute `#[blank]` introduced for the Token macros accordingly to collect all such tokens. `TokenRef::is_blank` function introduced that checks belonginess of the referred token to the Blanks set.\n This change does not affect parsing process. The `Token::blanks` serves a descriptive purposes only, and belongs to the same family of functions as the `Token::name` and `Token::describe`.\n - A new public `ParseError::aligned_span` function introduced that returns a SiteRefSpan that widens or shortens surrounding blank tokens of the origin error span (depending on the `recovery` field). This function assumed to provide more precise span of the underlying error message, and is utilized by the `ParseError::message` and the `ParseError::display` functions in particular.\n - `ToSpan::display` printing format has been changed. From now on the returning object prints the string in form of \": ( chars, blanks)\".\n - New `SiteRef` functions: `token_ref` that returns a token reference in fron of the site, `prev` that returns a SiteRef preceeding the current site, `next` that returns a SiteRef following by the current site.","shortMessageHtmlLink":"Error recovery and error reporting improvements"}},{"before":"8901cbca2b2d777be518c0a026943f1dd3b157ed","after":"a625738bb803a87b27d24b19a4f0f4f4cad55274","ref":"refs/heads/version-2","pushedAt":"2023-09-19T14:55:39.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"MutableUnit's Syntax Session cleans up discarded caches.\n\nPreviously there was an undesirable behavior of the MutableUnit that it was persisting Cluster caches even if they were discarded during the local re-parsing. From now on they will be cleaned up.","shortMessageHtmlLink":"MutableUnit's Syntax Session cleans up discarded caches."}},{"before":"ce05ac9003b093467f988e8a00f162c7f0d7bee5","after":"8901cbca2b2d777be518c0a026943f1dd3b157ed","ref":"refs/heads/version-2","pushedAt":"2023-09-18T17:09:42.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Snippet single-site annotations bug fixed","shortMessageHtmlLink":"Snippet single-site annotations bug fixed"}},{"before":"e905d09db4152c4aa8d6c8920853a6b579f027b6","after":"ce05ac9003b093467f988e8a00f162c7f0d7bee5","ref":"refs/heads/version-2","pushedAt":"2023-09-12T22:12:23.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Various iterator types exposed; SiteRefSpan implements Identifiable interface; More derives for SiteRef object","shortMessageHtmlLink":"Various iterator types exposed; SiteRefSpan implements Identifiable i…"}},{"before":"36b22fd550b672d03036ea98f89508bf8821dcd6","after":"e905d09db4152c4aa8d6c8920853a6b579f027b6","ref":"refs/heads/version-2","pushedAt":"2023-09-10T20:49:36.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Chunk::span function restored","shortMessageHtmlLink":"Chunk::span function restored"}},{"before":"b120a52a646b60a734827cf009cf1203ea5780b9","after":"36b22fd550b672d03036ea98f89508bf8821dcd6","ref":"refs/heads/version-2","pushedAt":"2023-09-09T19:16:57.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"SyntaxSession's lift_sinling and attach_node; EMPTY_RULE_SET renamed to EMPTY_NODE_SET","shortMessageHtmlLink":"SyntaxSession's lift_sinling and attach_node; EMPTY_RULE_SET renamed …"}},{"before":"b7616df0acf8eac23349ab75f6c669faea475c9d","after":"b120a52a646b60a734827cf009cf1203ea5780b9","ref":"refs/heads/version-2","pushedAt":"2023-09-07T14:51:44.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Overidden expressions bugs fixed","shortMessageHtmlLink":"Overidden expressions bugs fixed"}},{"before":"288d351f5c2dca34040bb25a5c5e27d52eeb6067","after":"b7616df0acf8eac23349ab75f6c669faea475c9d","ref":"refs/heads/version-2","pushedAt":"2023-09-07T10:06:45.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Describe attrribute format changed to ', ' or just '' where the Verbose part generated from the content","shortMessageHtmlLink":"Describe attrribute format changed to '<short>, <verbose>' or just '<…"}},{"before":"af21b4c8db056773b2f6030fcdc93902145abf4a","after":"288d351f5c2dca34040bb25a5c5e27d52eeb6067","ref":"refs/heads/version-2","pushedAt":"2023-09-06T14:03:16.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Id naming feature","shortMessageHtmlLink":"Id naming feature"}},{"before":"91b945d117dd92f24392394d8d9148b25fcf96e8","after":"af21b4c8db056773b2f6030fcdc93902145abf4a","ref":"refs/heads/version-2","pushedAt":"2023-09-05T05:55:24.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Eliah-Lakhin","name":"Ilya Lakhin","path":"/Eliah-Lakhin","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/223986?s=80&v=4"},"commit":{"message":"Pretty Printer and Snippet.\n\nTwo new features introduced to the `format` module: the `PrettyPrinter` interface for language-independent source code formatting, and Snippet for displaying (possibly annotated) source code in terminal.\n\n - `PrettyPrinter` exposes an alogirthm similar to the one used under the hood in the `prettyplease` crate.\n - `Formatter::snippet()` extension function of the standard Formatter returns a new `Snippet` interface that let the user printing a snippet of the `SourceCode` with a set of emphasizable spans with annotation messages. This implementation also have code highlighting capabilities.\n - `Style` interface for configuring terminal CSI of the text color and style.\n - `PrintString` interface which is similar to `Cow`, but also tracks a number of unicode chars (`Length`).\n - `SourceCode::substring()` from now on returns `PrintString`.\n - `ToSite`, `ToSpan` and `PolyRef` interfaces receive `display()` function to display the source code using `Snippet`.\n - `ParseError` messages formatting improved. From now on the `ParseError::display` is capable to use `Snippet` to display the error.\n - `TokenBuffer`, `Document`, `MutableUnit` and `ImmutableUnit` receive Display implementations that use `Snippet`.\n\nOther changes:\n\n - `CodeContent` merged to `SourceCode`.\n - `ToPosition` interface merged to `ToSite`.\n - `ToSpan` is auto-implemented for `&T`, where `T: ToSpan`.\n - `ParseError::describe()` renamed to `message`.\n - `Token` and `Node` interfaces' `describe` function receives additional boolean parameter `verbose`. When set to `true` it assumed to return verbose user-facing description of the object. When set to `false` it assumed to return just a short (and potentially non-unique) name of the object's class. E.g. a set of nodes may return \"keyword\" in this case for all variants of the source code Keyword class. Apprpriate necessary changes introduced in the macro system.\n - New `NodeRef::get_token` function that works similary to `get_child`, but returns a TokenRef for the child token by key.","shortMessageHtmlLink":"Pretty Printer and Snippet."}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEJ5xc0QA","startCursor":null,"endCursor":null}},"title":"Activity · Eliah-Lakhin/lady-deirdre"}