text
stringlengths
19
585k
label
stringclasses
2 values
category
stringclasses
2 values
language
stringclasses
14 values
repo
stringclasses
932 values
sha
stringlengths
40
40
@@ -647,4 +649,28 @@ private void writeTarFile( private <E> List<Future<E>> scheduleCallables(ImmutableList<? extends Callable<E>> callables) { return callables.stream().map(executorService::submit).collect(Collectors.toList()); } + + private String computeArchitecture(String architecture) { + if (archit...
bad
review
java
GoogleContainerTools/jib
8eadc59b484b567cad1f32fc2a785a372f71fe9a
diff --git a/jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java b/jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java index 46c63bfc9d..be760a13eb 100644 --- a/jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java +++ b/jib-core/src/m...
good
review_fixed
java
GoogleContainerTools/jib
8eadc59b484b567cad1f32fc2a785a372f71fe9a
@@ -69,4 +69,15 @@ void save(ImageReference imageReference, Path outputPath, Consumer<Long> written * @throws InterruptedException if the {@code docker inspect} process was interrupted */ ImageDetails inspect(ImageReference imageReference) throws IOException, InterruptedException; + + /** + * Gets the os ...
bad
review
java
GoogleContainerTools/jib
8eadc59b484b567cad1f32fc2a785a372f71fe9a
diff --git a/jib-core/src/main/java/com/google/cloud/tools/jib/api/DockerClient.java b/jib-core/src/main/java/com/google/cloud/tools/jib/api/DockerClient.java index 50ce2f463f..7e08a79495 100644 --- a/jib-core/src/main/java/com/google/cloud/tools/jib/api/DockerClient.java +++ b/jib-core/src/main/java/com/google/cloud/t...
good
review_fixed
java
GoogleContainerTools/jib
8eadc59b484b567cad1f32fc2a785a372f71fe9a
@@ -647,4 +656,29 @@ private void writeTarFile( private <E> List<Future<E>> scheduleCallables(ImmutableList<? extends Callable<E>> callables) { return callables.stream().map(executorService::submit).collect(Collectors.toList()); } + + private String computeArchitecture(String architecture) { + if (archit...
bad
review
java
GoogleContainerTools/jib
8eadc59b484b567cad1f32fc2a785a372f71fe9a
diff --git a/jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java b/jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java index 46c63bfc9d..be760a13eb 100644 --- a/jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java +++ b/jib-core/src/m...
good
review_fixed
java
GoogleContainerTools/jib
8eadc59b484b567cad1f32fc2a785a372f71fe9a
@@ -0,0 +1,40 @@ +/* + * Copyright 2024 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by ...
bad
review
java
GoogleContainerTools/jib
8eadc59b484b567cad1f32fc2a785a372f71fe9a
diff --git a/jib-core/src/main/java/com/google/cloud/tools/jib/api/DockerInfoDetails.java b/jib-core/src/main/java/com/google/cloud/tools/jib/api/DockerInfoDetails.java new file mode 100644 index 0000000000..fa486c40f9 --- /dev/null +++ b/jib-core/src/main/java/com/google/cloud/tools/jib/api/DockerInfoDetails.java @@ -...
good
review_fixed
java
GoogleContainerTools/jib
8eadc59b484b567cad1f32fc2a785a372f71fe9a
@@ -647,4 +656,29 @@ private void writeTarFile( private <E> List<Future<E>> scheduleCallables(ImmutableList<? extends Callable<E>> callables) { return callables.stream().map(executorService::submit).collect(Collectors.toList()); } + + private String computeArchitecture(String architecture) { + if (archit...
bad
review
java
GoogleContainerTools/jib
8eadc59b484b567cad1f32fc2a785a372f71fe9a
diff --git a/jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java b/jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java index 46c63bfc9d..be760a13eb 100644 --- a/jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java +++ b/jib-core/src/m...
good
review_fixed
java
GoogleContainerTools/jib
8eadc59b484b567cad1f32fc2a785a372f71fe9a
@@ -343,27 +342,38 @@ public void testBasicMultiPlatform_toDockerDaemon() } @Test - public void testBasicMultiPlatform_toDockerDaemon_noMatchingImage() { - ExecutionException exception = - assertThrows( - ExecutionException.class, - () -> - Jib.from( - ...
bad
review
java
GoogleContainerTools/jib
71772a6025cc0dfc84fcfb473e82f9217953d44d
diff --git a/jib-core/src/integration-test/java/com/google/cloud/tools/jib/api/JibIntegrationTest.java b/jib-core/src/integration-test/java/com/google/cloud/tools/jib/api/JibIntegrationTest.java index 4e49d1e12d..bf60f5d025 100644 --- a/jib-core/src/integration-test/java/com/google/cloud/tools/jib/api/JibIntegrationTes...
good
review_fixed
java
GoogleContainerTools/jib
71772a6025cc0dfc84fcfb473e82f9217953d44d
@@ -117,39 +117,27 @@ subprojects { /* CHECKSTYLE */ checkstyle { - toolVersion = '8.18' + toolVersion = '8.29' - // use the google checks packaged with the jar + // use google checks from the jar def googleChecks = resources.text.fromArchiveEntry(configurations.checkstyle[0], 'google_checks....
bad
review
GoogleContainerTools/jib
84f8d508452696357280b5ef9faf43d321ceee02
diff --git a/build.gradle b/build.gradle index 259224fa70..2526826d5f 100644 --- a/build.gradle +++ b/build.gradle @@ -117,39 +117,27 @@ subprojects { /* CHECKSTYLE */ checkstyle { - toolVersion = '8.18' + toolVersion = '8.29' - // use the google checks packaged with the jar + // use google checks...
good
review_fixed
GoogleContainerTools/jib
84f8d508452696357280b5ef9faf43d321ceee02
@@ -0,0 +1,38 @@ +<?xml version="1.0"?> +<!DOCTYPE suppressions PUBLIC + "-//Puppy Crawl//DTD Suppressions 1.1//EN" + "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> +<suppressions> + <!-- clash with google java format --> + <suppress files=".*\.java" checks="SingleLineJavadoc"/> + <suppress files=".*\.java...
bad
review
GoogleContainerTools/jib
84f8d508452696357280b5ef9faf43d321ceee02
diff --git a/config/checkstyle/checkstyle-suppressions.xml b/config/checkstyle/checkstyle-suppressions.xml new file mode 100644 index 0000000000..dc3965226f --- /dev/null +++ b/config/checkstyle/checkstyle-suppressions.xml @@ -0,0 +1,38 @@ +<?xml version="1.0"?> +<!DOCTYPE suppressions PUBLIC + "-//Puppy Crawl//DTD Su...
good
review_fixed
GoogleContainerTools/jib
84f8d508452696357280b5ef9faf43d321ceee02
@@ -0,0 +1,1780 @@ +#![expect(unused, reason = "WIP: the Document API surface is still being wired in")] +use std::{borrow::Cow, collections::HashMap, sync::Arc}; + +pub use graphene_resource::{ResourceHash, ResourceId}; +use serde::{Deserialize, Serialize}; + +pub mod delta; +pub mod from_runtime; +pub mod metadata_so...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/lib.rs b/document/graph-storage/src/lib.rs new file mode 100644 index 0000000000..0e811cd741 --- /dev/null +++ b/document/graph-storage/src/lib.rs @@ -0,0 +1,36 @@ +pub use graphene_resource::{ResourceHash, ResourceId}; + +pub mod attributes; +pub mod crdt; +pub mod delta; +pub m...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,1780 @@ +#![expect(unused, reason = "WIP: the Document API surface is still being wired in")] +use std::{borrow::Cow, collections::HashMap, sync::Arc}; + +pub use graphene_resource::{ResourceHash, ResourceId}; +use serde::{Deserialize, Serialize}; + +pub mod delta; +pub mod from_runtime; +pub mod metadata_so...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/lib.rs b/document/graph-storage/src/lib.rs new file mode 100644 index 0000000000..0e811cd741 --- /dev/null +++ b/document/graph-storage/src/lib.rs @@ -0,0 +1,36 @@ +pub use graphene_resource::{ResourceHash, ResourceId}; + +pub mod attributes; +pub mod crdt; +pub mod delta; +pub m...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -246,6 +247,16 @@ impl ResourceId { pub fn new() -> Self { Self(core_types::uuid::generate_uuid()) } + + /// Derive a deterministic ID from a content hash (first 8 bytes, little-endian). Used when + /// bootstrapping resources from an existing document so re-conversion is stable and identical + /// content ma...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/node-graph/libraries/resources/src/lib.rs b/node-graph/libraries/resources/src/lib.rs index 0fffabb324..516e186371 100644 --- a/node-graph/libraries/resources/src/lib.rs +++ b/node-graph/libraries/resources/src/lib.rs @@ -246,6 +246,16 @@ impl ResourceId { pub fn new() -> Self { Self(core_types::uuid:...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,539 @@ +use std::collections::HashMap; + +use core_types::Context; +use core_types::context::ContextDependencies; +use core_types::uuid::NodeId as RuntimeNodeId; +use graph_craft::concrete; +use graph_craft::document::value::TaggedValue; +use graph_craft::document::{DocumentNode, DocumentNodeImplementation, ...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/from_runtime.rs b/document/graph-storage/src/from_runtime.rs new file mode 100644 index 0000000000..0c2cd26f41 --- /dev/null +++ b/document/graph-storage/src/from_runtime.rs @@ -0,0 +1,573 @@ +use std::collections::HashMap; + +use core_types::Context; +use core_types::context::Co...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,260 @@ +use std::borrow::Cow; +use std::collections::HashMap; + +use core_types::memo::MemoHash; +use core_types::uuid::NodeId as RuntimeNodeId; +use graph_craft::document::value::TaggedValue; +use graph_craft::document::{DocumentNode, DocumentNodeImplementation, NodeInput as GraphCraftNodeInput, NodeNetwork...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/to_runtime.rs b/document/graph-storage/src/to_runtime.rs new file mode 100644 index 0000000000..d9f19852ae --- /dev/null +++ b/document/graph-storage/src/to_runtime.rs @@ -0,0 +1,380 @@ +use std::borrow::Cow; +use std::collections::HashMap; + +use core_types::memo::MemoHash; +use...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,364 @@ +use std::collections::{HashMap, HashSet}; + +use crate::{AttributeDelta, ExportSlot, NetworkId, Node, NodeId, NodeInput, Registry, RegistryDelta, ResourceEntry, ResourceId, TimeStamp}; + +/// Minimal set of deltas to transform `from` into `to`. +/// +/// Emits timestamp-less op shapes; the caller (`D...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/delta.rs b/document/graph-storage/src/delta.rs new file mode 100644 index 0000000000..bcbe59a592 --- /dev/null +++ b/document/graph-storage/src/delta.rs @@ -0,0 +1,425 @@ +use std::collections::HashSet; + +use crate::{AttributeDelta, NetworkId, Node, NodeId, Registry, RegistryDel...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,364 @@ +use std::collections::{HashMap, HashSet}; + +use crate::{AttributeDelta, ExportSlot, NetworkId, Node, NodeId, NodeInput, Registry, RegistryDelta, ResourceEntry, ResourceId, TimeStamp}; + +/// Minimal set of deltas to transform `from` into `to`. +/// +/// Emits timestamp-less op shapes; the caller (`D...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/delta.rs b/document/graph-storage/src/delta.rs new file mode 100644 index 0000000000..bcbe59a592 --- /dev/null +++ b/document/graph-storage/src/delta.rs @@ -0,0 +1,425 @@ +use std::collections::HashSet; + +use crate::{AttributeDelta, NetworkId, Node, NodeId, Registry, RegistryDel...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,539 @@ +use std::collections::HashMap; + +use core_types::Context; +use core_types::context::ContextDependencies; +use core_types::uuid::NodeId as RuntimeNodeId; +use graph_craft::concrete; +use graph_craft::document::value::TaggedValue; +use graph_craft::document::{DocumentNode, DocumentNodeImplementation, ...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/from_runtime.rs b/document/graph-storage/src/from_runtime.rs new file mode 100644 index 0000000000..0c2cd26f41 --- /dev/null +++ b/document/graph-storage/src/from_runtime.rs @@ -0,0 +1,573 @@ +use std::collections::HashMap; + +use core_types::Context; +use core_types::context::Co...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,150 @@ +use crate::TimeStamp; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +/// Attribute keys. Glob-import (`use crate::attr::*`) at conversion sites. +/// +/// `ui::*` keys are namespaced per CRDT design so each value gets its own LWW timestamp. Per-input +/// keys live on `Node....
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/attributes.rs b/document/graph-storage/src/attributes.rs new file mode 100644 index 0000000000..aa7c7f221e --- /dev/null +++ b/document/graph-storage/src/attributes.rs @@ -0,0 +1,71 @@ +use crate::TimeStamp; +use serde::{Deserialize, Serialize}; +use std::collections::BTreeMap; +...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,270 @@ +use std::borrow::Cow; +use std::collections::HashMap; + +use core_types::memo::MemoHash; +use core_types::uuid::NodeId as RuntimeNodeId; +use graph_craft::document::value::TaggedValue; +use graph_craft::document::{DocumentNode, DocumentNodeImplementation, NodeInput as GraphCraftNodeInput, NodeNetwork...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/to_runtime.rs b/document/graph-storage/src/to_runtime.rs new file mode 100644 index 0000000000..d9f19852ae --- /dev/null +++ b/document/graph-storage/src/to_runtime.rs @@ -0,0 +1,380 @@ +use std::borrow::Cow; +use std::collections::HashMap; + +use core_types::memo::MemoHash; +use...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,200 @@ +use crate::{Attributes, AttributesExt, Network, NetworkId, Node, NodeId, NodeInput, PeerId, ResourceEntry, ResourceId, Rev, SourceKey, TimeStamp, UserId, Value, attr, compute_rev}; +use graphene_resource::ResourceHash; +use serde::{Deserialize, Serialize}; + +/// Content-addressed delta: `id` is `bla...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/crdt.rs b/document/graph-storage/src/crdt.rs new file mode 100644 index 0000000000..d099086dc8 --- /dev/null +++ b/document/graph-storage/src/crdt.rs @@ -0,0 +1,189 @@ +use crate::{Attributes, AttributesWrite, Network, NetworkId, Node, NodeId, NodeInput, PeerId, ResourceEntry, Re...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,92 @@ +use crate::RegistryDelta; +use serde::{Deserialize, Serialize}; + +pub type NodeId = u64; +pub type NetworkId = u64; +/// Content-addressed identity for a `Delta`. +/// 128-bit blake3 truncation: comfortable collision headroom for any plausible document lifetime +/// without being adversarial-grade. S...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/ids.rs b/document/graph-storage/src/ids.rs new file mode 100644 index 0000000000..216af8c667 --- /dev/null +++ b/document/graph-storage/src/ids.rs @@ -0,0 +1,99 @@ +use crate::RegistryDelta; +use serde::{Deserialize, Serialize}; + +/// Stable, document-scoped identity for a node....
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,512 @@ +use crate::from_runtime; +use crate::{ApplyMode, AttributesExt, Delta, Document, LamportClock, NetworkId, NodeMetadataSource, PeerId, Registry, RegistryDelta, RegistryTarget, ResourceEntry, Rev, TimeStamp, UserId}; +use graphene_resource::{ResourceHash, ResourceId}; +use serde::{Deserialize, Serializ...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/session.rs b/document/graph-storage/src/session.rs new file mode 100644 index 0000000000..9e287c51ac --- /dev/null +++ b/document/graph-storage/src/session.rs @@ -0,0 +1,545 @@ +use crate::from_runtime; +use crate::{ApplyMode, AttributesWrite, Delta, Document, LamportClock, Netwo...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,370 @@ +use std::collections::{HashMap, HashSet}; + +use crate::{AttributeDelta, ExportSlot, NetworkId, Node, NodeId, NodeInput, Registry, RegistryDelta, ResourceEntry, ResourceId, TimeStamp}; + +/// Minimal set of deltas to transform `from` into `to`. +/// +/// Emits timestamp-less op shapes; the caller (`D...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/delta.rs b/document/graph-storage/src/delta.rs new file mode 100644 index 0000000000..bcbe59a592 --- /dev/null +++ b/document/graph-storage/src/delta.rs @@ -0,0 +1,425 @@ +use std::collections::HashSet; + +use crate::{AttributeDelta, NetworkId, Node, NodeId, Registry, RegistryDel...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,124 @@ +use crate::{Attributes, NetworkId, NodeId, ResourceId, TimeStamp, attributes_value_equal}; +use serde::{Deserialize, Serialize}; +use std::borrow::Cow; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Node { + pub(crate) implementation: Implementation, + pub(crate) inputs: Ve...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/model.rs b/document/graph-storage/src/model.rs new file mode 100644 index 0000000000..6b9c1c4663 --- /dev/null +++ b/document/graph-storage/src/model.rs @@ -0,0 +1,189 @@ +use crate::{Attributes, NetworkId, NodeId, ResourceId, TimeStamp, attributes_value_equal}; +use serde::{Dese...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,124 @@ +use crate::{Attributes, NetworkId, NodeId, ResourceId, TimeStamp, attributes_value_equal}; +use serde::{Deserialize, Serialize}; +use std::borrow::Cow; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Node { + pub(crate) implementation: Implementation, + pub(crate) inputs: Ve...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/model.rs b/document/graph-storage/src/model.rs new file mode 100644 index 0000000000..6b9c1c4663 --- /dev/null +++ b/document/graph-storage/src/model.rs @@ -0,0 +1,189 @@ +use crate::{Attributes, NetworkId, NodeId, ResourceId, TimeStamp, attributes_value_equal}; +use serde::{Dese...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,21 @@ +[package] +name = "graph-storage" +description = "Provides a delta based graph representation used in the Graphite file format" +edition.workspace = true +version.workspace = true +license.workspace = true +authors.workspace = true + +[dependencies] +serde = { workspace = true } +serde_json = { worksp...
bad
review
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/Cargo.toml b/document/graph-storage/Cargo.toml new file mode 100644 index 0000000000..53d86b4b6f --- /dev/null +++ b/document/graph-storage/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "graph-storage" +description = "Provides a delta based graph representation used in the Graphite ...
good
review_fixed
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,21 @@ +[package] +name = "graph-storage" +description = "Provides a delta based graph representation used in the Graphite file format" +edition.workspace = true +version.workspace = true +license.workspace = true +authors.workspace = true + +[dependencies] +serde = { workspace = true } +serde_json = { worksp...
bad
review
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/Cargo.toml b/document/graph-storage/Cargo.toml new file mode 100644 index 0000000000..53d86b4b6f --- /dev/null +++ b/document/graph-storage/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "graph-storage" +description = "Provides a delta based graph representation used in the Graphite ...
good
review_fixed
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,21 @@ +[package] +name = "graph-storage" +description = "Provides a delta based graph representation used in the Graphite file format" +edition.workspace = true +version.workspace = true +license.workspace = true +authors.workspace = true + +[dependencies] +serde = { workspace = true } +serde_json = { worksp...
bad
review
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/Cargo.toml b/document/graph-storage/Cargo.toml new file mode 100644 index 0000000000..53d86b4b6f --- /dev/null +++ b/document/graph-storage/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "graph-storage" +description = "Provides a delta based graph representation used in the Graphite ...
good
review_fixed
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,534 @@ +use crate::from_runtime; +use crate::{ApplyMode, AttributesExt, Delta, Document, LamportClock, NetworkId, NodeMetadataSource, PeerId, Registry, RegistryDelta, RegistryTarget, ResourceEntry, Rev, TimeStamp, UserId}; +use graphene_resource::{ResourceHash, ResourceId}; +use serde::{Deserialize, Serializ...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/session.rs b/document/graph-storage/src/session.rs new file mode 100644 index 0000000000..9e287c51ac --- /dev/null +++ b/document/graph-storage/src/session.rs @@ -0,0 +1,545 @@ +use crate::from_runtime; +use crate::{ApplyMode, AttributesWrite, Delta, Document, LamportClock, Netwo...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,92 @@ +use crate::RegistryDelta; +use serde::{Deserialize, Serialize}; + +pub type NodeId = u64; +pub type NetworkId = u64; +/// Content-addressed identity for a `Delta`. +/// 128-bit blake3 truncation: comfortable collision headroom for any plausible document lifetime +/// without being adversarial-grade. S...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/ids.rs b/document/graph-storage/src/ids.rs new file mode 100644 index 0000000000..216af8c667 --- /dev/null +++ b/document/graph-storage/src/ids.rs @@ -0,0 +1,99 @@ +use crate::RegistryDelta; +use serde::{Deserialize, Serialize}; + +/// Stable, document-scoped identity for a node....
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,534 @@ +use crate::from_runtime; +use crate::{ApplyMode, AttributesExt, Delta, Document, LamportClock, NetworkId, NodeMetadataSource, PeerId, Registry, RegistryDelta, RegistryTarget, ResourceEntry, Rev, TimeStamp, UserId}; +use graphene_resource::{ResourceHash, ResourceId}; +use serde::{Deserialize, Serializ...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/session.rs b/document/graph-storage/src/session.rs new file mode 100644 index 0000000000..9e287c51ac --- /dev/null +++ b/document/graph-storage/src/session.rs @@ -0,0 +1,545 @@ +use crate::from_runtime; +use crate::{ApplyMode, AttributesWrite, Delta, Document, LamportClock, Netwo...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,480 @@ +use crate::{ + CrdtError, Delta, ExportSlot, HotOp, LamportClock, MAX_EXPORT_SLOTS, NetworkId, NodeId, NodeInput, PeerId, Registry, RegistryDelta, ResourceEntry, Rev, SourceValue, TimeStamp, Value, + apply_attribute_delta, attr, mint_node_id, reverse_attribute_delta, +}; +use serde::{Deserialize, Ser...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/document.rs b/document/graph-storage/src/document.rs new file mode 100644 index 0000000000..d93bc9a032 --- /dev/null +++ b/document/graph-storage/src/document.rs @@ -0,0 +1,459 @@ +use crate::{ + CrdtError, Delta, ExportSlot, HotOp, LamportClock, MAX_EXPORT_SLOTS, NetworkId, Node...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,277 @@ +use std::borrow::Cow; +use std::collections::HashMap; + +use core_types::memo::MemoHash; +use core_types::uuid::NodeId as RuntimeNodeId; +use graph_craft::document::value::TaggedValue; +use graph_craft::document::{DocumentNode, DocumentNodeImplementation, NodeInput as GraphCraftNodeInput, NodeNetwork...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/to_runtime.rs b/document/graph-storage/src/to_runtime.rs new file mode 100644 index 0000000000..d9f19852ae --- /dev/null +++ b/document/graph-storage/src/to_runtime.rs @@ -0,0 +1,380 @@ +use std::borrow::Cow; +use std::collections::HashMap; + +use core_types::memo::MemoHash; +use...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,155 @@ +use crate::TimeStamp; +use serde::{Deserialize, Serialize}; +use std::collections::BTreeMap; + +/// Attribute keys. Glob-import (`use crate::attr::*`) at conversion sites. +/// +/// `ui::*` keys are namespaced per CRDT design so each value gets its own LWW timestamp. Per-input +/// keys live on `Node...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/attributes.rs b/document/graph-storage/src/attributes.rs new file mode 100644 index 0000000000..aa7c7f221e --- /dev/null +++ b/document/graph-storage/src/attributes.rs @@ -0,0 +1,71 @@ +use crate::TimeStamp; +use serde::{Deserialize, Serialize}; +use std::collections::BTreeMap; +...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,370 @@ +use std::collections::HashSet; + +use crate::{AttributeDelta, NetworkId, Node, NodeId, Registry, RegistryDelta, ResourceEntry, ResourceId}; + +/// Minimal set of deltas to transform `from` into `to`. +/// +/// Emits timestamp-less op shapes; the caller (`Document::commit_local` or equivalent) wraps e...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/delta.rs b/document/graph-storage/src/delta.rs new file mode 100644 index 0000000000..bcbe59a592 --- /dev/null +++ b/document/graph-storage/src/delta.rs @@ -0,0 +1,425 @@ +use std::collections::HashSet; + +use crate::{AttributeDelta, NetworkId, Node, NodeId, Registry, RegistryDel...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,277 @@ +use std::borrow::Cow; +use std::collections::HashMap; + +use core_types::memo::MemoHash; +use core_types::uuid::NodeId as RuntimeNodeId; +use graph_craft::document::value::TaggedValue; +use graph_craft::document::{DocumentNode, DocumentNodeImplementation, NodeInput as GraphCraftNodeInput, NodeNetwork...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/to_runtime.rs b/document/graph-storage/src/to_runtime.rs new file mode 100644 index 0000000000..d9f19852ae --- /dev/null +++ b/document/graph-storage/src/to_runtime.rs @@ -0,0 +1,380 @@ +use std::borrow::Cow; +use std::collections::HashMap; + +use core_types::memo::MemoHash; +use...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,120 @@ +use crate::{PeerId, Priority, TimeStamp}; +use graphene_resource::{ResourceHash, ResourceId}; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +/// Ordering key for an entry in a resource's source chain: fractional `priority`, with `peer` as +/// the tiebreak so concurrent inse...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/resources.rs b/document/graph-storage/src/resources.rs new file mode 100644 index 0000000000..a29a37e2b3 --- /dev/null +++ b/document/graph-storage/src/resources.rs @@ -0,0 +1,297 @@ +use crate::{PeerId, TimeStamp}; +use graphene_resource::{ResourceHash, ResourceId}; +use serde::...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,178 @@ +use crate::{Attributes, AttributesExt, Network, NetworkId, Node, NodeId, NodeInput, PeerId, ResourceEntry, ResourceId, Rev, SourceKey, TimeStamp, UserId, Value, attr, compute_rev}; +use graphene_resource::ResourceHash; +use serde::{Deserialize, Serialize}; + +/// Content-addressed delta: `id` is `bla...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/crdt.rs b/document/graph-storage/src/crdt.rs new file mode 100644 index 0000000000..d099086dc8 --- /dev/null +++ b/document/graph-storage/src/crdt.rs @@ -0,0 +1,189 @@ +use crate::{Attributes, AttributesWrite, Network, NetworkId, Node, NodeId, NodeInput, PeerId, ResourceEntry, Re...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,420 @@ +use std::collections::HashSet; + +use crate::{AttributeDelta, NetworkId, Node, NodeId, Registry, RegistryDelta, ResourceEntry, ResourceId}; + +/// Collect a `HashSet` walk (difference/intersection) into ascending order. The sets iterate in +/// random order, so sorting keeps `compute_deltas` emitting...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/delta.rs b/document/graph-storage/src/delta.rs new file mode 100644 index 0000000000..bcbe59a592 --- /dev/null +++ b/document/graph-storage/src/delta.rs @@ -0,0 +1,425 @@ +use std::collections::HashSet; + +use crate::{AttributeDelta, NetworkId, Node, NodeId, Registry, RegistryDel...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,184 @@ +use crate::{Attributes, NetworkId, NodeId, ResourceId, TimeStamp, attributes_value_equal}; +use serde::{Deserialize, Serialize}; +use std::borrow::Cow; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Node { + pub(crate) implementation: Implementation, + pub(crate) inputs: Ve...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/model.rs b/document/graph-storage/src/model.rs new file mode 100644 index 0000000000..6b9c1c4663 --- /dev/null +++ b/document/graph-storage/src/model.rs @@ -0,0 +1,189 @@ +use crate::{Attributes, NetworkId, NodeId, ResourceId, TimeStamp, attributes_value_equal}; +use serde::{Dese...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,178 @@ +use crate::{Attributes, AttributesExt, Network, NetworkId, Node, NodeId, NodeInput, PeerId, ResourceEntry, ResourceId, Rev, SourceKey, TimeStamp, UserId, Value, attr, compute_rev}; +use graphene_resource::ResourceHash; +use serde::{Deserialize, Serialize}; + +/// Content-addressed delta: `id` is `bla...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/crdt.rs b/document/graph-storage/src/crdt.rs new file mode 100644 index 0000000000..d099086dc8 --- /dev/null +++ b/document/graph-storage/src/crdt.rs @@ -0,0 +1,189 @@ +use crate::{Attributes, AttributesWrite, Network, NetworkId, Node, NodeId, NodeInput, PeerId, ResourceEntry, Re...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,173 @@ +use crate::{PeerId, Priority, TimeStamp}; +use graphene_resource::{ResourceHash, ResourceId}; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +/// Ordering key for an entry in a resource's source chain: fractional `priority`, with `peer` as +/// the tiebreak so concurrent inse...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/resources.rs b/document/graph-storage/src/resources.rs new file mode 100644 index 0000000000..a29a37e2b3 --- /dev/null +++ b/document/graph-storage/src/resources.rs @@ -0,0 +1,297 @@ +use crate::{PeerId, TimeStamp}; +use graphene_resource::{ResourceHash, ResourceId}; +use serde::...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -246,6 +246,16 @@ impl ResourceId { pub fn new() -> Self { Self(core_types::uuid::generate_uuid()) } + + /// Derive a deterministic ID from a content hash (first 8 bytes, little-endian). Used when + /// bootstrapping resources from an existing document so re-conversion is stable and identical + /// content ma...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/node-graph/libraries/resources/src/lib.rs b/node-graph/libraries/resources/src/lib.rs index 0fffabb324..516e186371 100644 --- a/node-graph/libraries/resources/src/lib.rs +++ b/node-graph/libraries/resources/src/lib.rs @@ -246,6 +246,16 @@ impl ResourceId { pub fn new() -> Self { Self(core_types::uuid:...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,92 @@ +use crate::RegistryDelta; +use serde::{Deserialize, Serialize}; + +pub type NodeId = u64; +pub type NetworkId = u64; +/// Content-addressed identity for a `Delta`. +/// 128-bit blake3 truncation: comfortable collision headroom for any plausible document lifetime +/// without being adversarial-grade. S...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/ids.rs b/document/graph-storage/src/ids.rs new file mode 100644 index 0000000000..216af8c667 --- /dev/null +++ b/document/graph-storage/src/ids.rs @@ -0,0 +1,99 @@ +use crate::RegistryDelta; +use serde::{Deserialize, Serialize}; + +/// Stable, document-scoped identity for a node....
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,92 @@ +use crate::RegistryDelta; +use serde::{Deserialize, Serialize}; + +pub type NodeId = u64; +pub type NetworkId = u64; +/// Content-addressed identity for a `Delta`. +/// 128-bit blake3 truncation: comfortable collision headroom for any plausible document lifetime +/// without being adversarial-grade. S...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/ids.rs b/document/graph-storage/src/ids.rs new file mode 100644 index 0000000000..216af8c667 --- /dev/null +++ b/document/graph-storage/src/ids.rs @@ -0,0 +1,99 @@ +use crate::RegistryDelta; +use serde::{Deserialize, Serialize}; + +/// Stable, document-scoped identity for a node....
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,123 @@ +//! Lets `from_runtime` read editor-side per-node metadata without depending on the editor crate. +//! The editor implements this on `NodeNetworkInterface`; tests pass [`NoMetadata`]. +//! +//! `network_path` is the chain of runtime local `NodeId`s from the root down to (but not including) +//! the q...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/metadata_source.rs b/document/graph-storage/src/metadata_source.rs new file mode 100644 index 0000000000..62bcde76a4 --- /dev/null +++ b/document/graph-storage/src/metadata_source.rs @@ -0,0 +1,130 @@ +//! Lets `from_runtime` read editor-side per-node metadata without depending o...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,543 @@ +use std::collections::HashMap; + +use core_types::Context; +use core_types::context::ContextDependencies; +use core_types::uuid::NodeId as RuntimeNodeId; +use graph_craft::concrete; +use graph_craft::document::value::TaggedValue; +use graph_craft::document::{DocumentNode, DocumentNodeImplementation, ...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/from_runtime.rs b/document/graph-storage/src/from_runtime.rs new file mode 100644 index 0000000000..0c2cd26f41 --- /dev/null +++ b/document/graph-storage/src/from_runtime.rs @@ -0,0 +1,573 @@ +use std::collections::HashMap; + +use core_types::Context; +use core_types::context::Co...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,213 @@ +use crate::{PeerId, Priority, TimeStamp}; +use graphene_resource::{ResourceHash, ResourceId}; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +/// Ordering key for an entry in a resource's source chain: fractional `priority`, with `peer` as +/// the tiebreak so concurrent inse...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/resources.rs b/document/graph-storage/src/resources.rs new file mode 100644 index 0000000000..a29a37e2b3 --- /dev/null +++ b/document/graph-storage/src/resources.rs @@ -0,0 +1,297 @@ +use crate::{PeerId, TimeStamp}; +use graphene_resource::{ResourceHash, ResourceId}; +use serde::...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,213 @@ +use crate::{PeerId, Priority, TimeStamp}; +use graphene_resource::{ResourceHash, ResourceId}; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +/// Ordering key for an entry in a resource's source chain: fractional `priority`, with `peer` as +/// the tiebreak so concurrent inse...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/resources.rs b/document/graph-storage/src/resources.rs new file mode 100644 index 0000000000..a29a37e2b3 --- /dev/null +++ b/document/graph-storage/src/resources.rs @@ -0,0 +1,297 @@ +use crate::{PeerId, TimeStamp}; +use graphene_resource::{ResourceHash, ResourceId}; +use serde::...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,191 @@ +use crate::{Attributes, AttributesExt, Network, NetworkId, Node, NodeId, NodeInput, PeerId, ResourceEntry, ResourceId, Rev, SourceKey, TimeStamp, UserId, Value, attr, compute_rev}; +use graphene_resource::ResourceHash; +use serde::{Deserialize, Serialize}; + +/// Content-addressed delta: `id` is `bla...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/crdt.rs b/document/graph-storage/src/crdt.rs new file mode 100644 index 0000000000..d099086dc8 --- /dev/null +++ b/document/graph-storage/src/crdt.rs @@ -0,0 +1,189 @@ +use crate::{Attributes, AttributesWrite, Network, NetworkId, Node, NodeId, NodeInput, PeerId, ResourceEntry, Re...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
@@ -0,0 +1,328 @@ +use std::borrow::Cow; +use std::collections::HashMap; + +use core_types::memo::MemoHash; +use core_types::uuid::NodeId as RuntimeNodeId; +use graph_craft::document::value::TaggedValue; +use graph_craft::document::{DocumentNode, DocumentNodeImplementation, NodeInput as GraphCraftNodeInput, NodeNetwork...
bad
review
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8
diff --git a/document/graph-storage/src/to_runtime.rs b/document/graph-storage/src/to_runtime.rs new file mode 100644 index 0000000000..d9f19852ae --- /dev/null +++ b/document/graph-storage/src/to_runtime.rs @@ -0,0 +1,380 @@ +use std::borrow::Cow; +use std::collections::HashMap; + +use core_types::memo::MemoHash; +use...
good
review_fixed
rust
GraphiteEditor/Graphite
fdcd63d9db43cd8fef91b929d90740c835cf12f8