Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(sdk)!: remove index based names #848

Merged
merged 10 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions .ghjk/lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,8 @@
"releaseTag": "20240814",
"specifiedVersion": true
},
"bciqef6pcivthu6ra2liydilk2afeip3lxwaqnvkv5l6dls3rzk2hvvq": {
"version": "v24.4",
"bciqfoh6rcv3bhze6nzb3edufogn5usavol623q7hw6lfuq3du3fe3ry": {
"version": "v28.2",
"buildDepConfigs": {},
"portRef": "[email protected]",
"specifiedVersion": true
Expand Down Expand Up @@ -821,7 +821,7 @@
},
"ghjkEnvProvInstSet____rust": {
"installs": [
"bciqecz522d7oento2kjvwx3waohx4mjhjjerefepetwyal6hxxs57wa",
"bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy",
"bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y",
"bciqirg723pselb4g77l6ssuytptohd3rvin4ybnwncidus52tfpu6ty"
],
Expand All @@ -838,7 +838,7 @@
"bciqmvgsg7h3ohj3m7das4bznahgt6tyq7mamta3n2vorulqvml7mywq",
"bciqicdqw36v63cbrscwsgtu2htrmwmgtfoxexv4rx5d2y24vytxbuma",
"bciqe33uhsuaesrjk6luzxrbbimwg5ydt6x2lrieelwbr7aft4g2qwsy",
"bciqecz522d7oento2kjvwx3waohx4mjhjjerefepetwyal6hxxs57wa",
"bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy",
"bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y",
"bciqirg723pselb4g77l6ssuytptohd3rvin4ybnwncidus52tfpu6ty",
"bciqfpjzi6gguk7dafyicfjpzpwtybgyc2dsnxg2zxkcmyinzy7abpla",
Expand All @@ -857,7 +857,7 @@
"ghjkEnvProvInstSet___oci": {
"installs": [
"bciqbx637744bfiyvprs77xdnvdt7uuwmtlntfjpwmkda672gklkbpmi",
"bciqecz522d7oento2kjvwx3waohx4mjhjjerefepetwyal6hxxs57wa",
"bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy",
"bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y",
"bciqirg723pselb4g77l6ssuytptohd3rvin4ybnwncidus52tfpu6ty",
"bciqojan3zglnfctnmqyxvnxaha46yrnlhj77j3kw4mxadvauqepqdba",
Expand Down Expand Up @@ -901,7 +901,7 @@
"bciqmvgsg7h3ohj3m7das4bznahgt6tyq7mamta3n2vorulqvml7mywq",
"bciqicdqw36v63cbrscwsgtu2htrmwmgtfoxexv4rx5d2y24vytxbuma",
"bciqe33uhsuaesrjk6luzxrbbimwg5ydt6x2lrieelwbr7aft4g2qwsy",
"bciqecz522d7oento2kjvwx3waohx4mjhjjerefepetwyal6hxxs57wa",
"bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy",
"bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y",
"bciqirg723pselb4g77l6ssuytptohd3rvin4ybnwncidus52tfpu6ty",
"bciqfpjzi6gguk7dafyicfjpzpwtybgyc2dsnxg2zxkcmyinzy7abpla",
Expand Down Expand Up @@ -939,7 +939,7 @@
},
"ghjkEnvProvInstSet_______task_env_test-rust": {
"installs": [
"bciqecz522d7oento2kjvwx3waohx4mjhjjerefepetwyal6hxxs57wa",
"bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy",
"bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y",
"bciqirg723pselb4g77l6ssuytptohd3rvin4ybnwncidus52tfpu6ty",
"bciqezep4ufkgwesldlm5etyfkgdsiickfudx7cosydcz6xtgeorn2hy",
Expand All @@ -953,7 +953,7 @@
},
"ghjkEnvProvInstSet_______task_env_dev-eg-tgraphs": {
"installs": [
"bciqecz522d7oento2kjvwx3waohx4mjhjjerefepetwyal6hxxs57wa",
"bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy",
"bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y",
"bciqirg723pselb4g77l6ssuytptohd3rvin4ybnwncidus52tfpu6ty",
"bciqezep4ufkgwesldlm5etyfkgdsiickfudx7cosydcz6xtgeorn2hy",
Expand All @@ -967,7 +967,7 @@
},
"ghjkEnvProvInstSet_______task_env_build-tgraph-core": {
"installs": [
"bciqecz522d7oento2kjvwx3waohx4mjhjjerefepetwyal6hxxs57wa",
"bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy",
"bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y",
"bciqirg723pselb4g77l6ssuytptohd3rvin4ybnwncidus52tfpu6ty",
"bciqojan3zglnfctnmqyxvnxaha46yrnlhj77j3kw4mxadvauqepqdba",
Expand All @@ -979,7 +979,7 @@
},
"ghjkEnvProvInstSet_______task_env_build-tgraph-py": {
"installs": [
"bciqecz522d7oento2kjvwx3waohx4mjhjjerefepetwyal6hxxs57wa",
"bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy",
"bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y",
"bciqirg723pselb4g77l6ssuytptohd3rvin4ybnwncidus52tfpu6ty",
"bciqojan3zglnfctnmqyxvnxaha46yrnlhj77j3kw4mxadvauqepqdba",
Expand All @@ -994,7 +994,7 @@
},
"ghjkEnvProvInstSet_______task_env_build-tgraph-ts": {
"installs": [
"bciqecz522d7oento2kjvwx3waohx4mjhjjerefepetwyal6hxxs57wa",
"bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy",
"bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y",
"bciqirg723pselb4g77l6ssuytptohd3rvin4ybnwncidus52tfpu6ty",
"bciqojan3zglnfctnmqyxvnxaha46yrnlhj77j3kw4mxadvauqepqdba",
Expand All @@ -1009,7 +1009,7 @@
},
"ghjkEnvProvInstSet_______task_env_build-sys-tgraphs": {
"installs": [
"bciqecz522d7oento2kjvwx3waohx4mjhjjerefepetwyal6hxxs57wa",
"bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy",
"bciqlubbahrp4pxohyffmn5yj52atjgmn5nxepmkdev6wtmvpbx7kr7y",
"bciqirg723pselb4g77l6ssuytptohd3rvin4ybnwncidus52tfpu6ty",
"bciqfpjzi6gguk7dafyicfjpzpwtybgyc2dsnxg2zxkcmyinzy7abpla",
Expand All @@ -1025,6 +1025,11 @@
"id": "tasks",
"config": {
"tasks": {
"b": {
"ty": "denoFile@v1",
"key": "b",
"envKey": "bciqk7aif25pqtsyncbnbdapte4lixsodypfxvmkepsuey74vgr4zb5q"
},
"version-bump": {
"ty": "denoFile@v1",
"key": "version-bump",
Expand Down Expand Up @@ -1236,6 +1241,7 @@
}
},
"tasksNamed": [
"b",
"version-bump",
"version-print",
"test-lsp",
Expand Down Expand Up @@ -2396,8 +2402,8 @@
"cpy_bs_ghrel": "bciqfjhy4uuhkcogsnxxs5fv4ml7m5ykvfm4my45npfyoap2efbfsmby",
"node_org": "bciqexpmyf75pimfmu3czcedptwynipi6pztai4ixm6kdj6wwlymesby"
},
"bciqecz522d7oento2kjvwx3waohx4mjhjjerefepetwyal6hxxs57wa": {
"version": "v24.4",
"bciqfjvqemdy7d6axvwkywcm6v66wogddvk7k6e6rps4e6zidkjvm4fy": {
"version": "v28.2",
"port": {
"ty": "denoWorker@v1",
"name": "protoc_ghrel",
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 55 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions examples/typegraphs/metagen/rs/fdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,17 @@ macro_rules! init_mat {
// gen-static-end
use types::*;
pub mod types {
pub type StringDateTime4 = String;
pub type StringUri5 = String;
pub type Idv3TitleString = String;
pub type Idv3ReleaseTimeStringDatetime = String;
pub type Idv3Mp3UrlStringUri = String;
#[derive(Debug, serde::Serialize, serde::Deserialize)]
pub struct Idv3 {
pub title: String,
pub artist: String,
pub title: Idv3TitleString,
pub artist: Idv3TitleString,
#[serde(rename = "releaseTime")]
pub release_time: StringDateTime4,
pub release_time: Idv3ReleaseTimeStringDatetime,
#[serde(rename = "mp3Url")]
pub mp3_url: StringUri5,
pub mp3_url: Idv3Mp3UrlStringUri,
}
}
pub mod stubs {
Expand Down
10 changes: 9 additions & 1 deletion ghjk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ env("main")

env("_rust").install(
// use rustup for the actual toolchain
ports.protoc({ version: "v24.4" }),
ports.protoc({ version: "v28.2" }),
ports.cmake()[0],
);

Expand Down Expand Up @@ -159,3 +159,11 @@ task("version-bump", async ($) => {
});
await $`ghjk x lock-sed`;
});

task("b", async ($) => {
await $`cargo b --target wasm32-unknown-unknown --package typegraph-ng`;
await $`wasm-tools component new "target/wasm32-unknown-unknown/debug/typegraph_ng.wasm"
-o ./target/ng.wasm
`;
// --adapt wasi_snapshot_preview1=./tmp/wasi_snapshot_preview1.reactor.wasm
}, { inherit: "_wasm" });
11 changes: 11 additions & 0 deletions src/common/src/typegraph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,15 @@ impl Typegraph {
_ => bail!("typegraph is invalid: root node is not object"),
}
}
/*
pub fn idx_of(&self, id: &str) -> Option<u32> {
self.name_map.get(id).map(|&idx| idx)
}

pub fn get(&self, id: &str) -> Option<&TypeNode> {
let Some(&idx) = self.name_map.get(id) else {
return None;
};
Some(&self.types[idx as usize])
} */
Natoandro marked this conversation as resolved.
Show resolved Hide resolved
}
Loading
Loading