Skip to content

Commit 3982f61

Browse files
authored
Feature/scrub interpreter (#41)
* Clean up FFiValue -> Value Conversion Also fixed the plugins to do the right thing with error conditions. * Removed the Interpreter For better or worse. * Fixed HTTP plugin Minor other tweaks. * Got SQLX plugin working with BubbaError That's about it. * Get std plugin working. * Got markdown plugin working with BubbaError * Got blog working again The counter stuff was messed up because Postgres cares about the type you bind. * Whoops -- too much. There is a fix for the sqlx plugin that specifies the type of the thing being bound. There is a fix for blessing tests. I needed to disable all the noise that the extruder and compiler make. There is an async block addition too. Now you can create async blocks and await them: ```rust fn main() { let x = async { let y = 1; y }; let z = x.await; // This will print 1 println!("{}", z); } ``` ` * Tests Most especially for the async block. * tests * FfiValue tests * Working on FFI tests Ran into this thing with FFi lists not having a type. Sorted it out by giving it the option of a type. Fixed the into value trait impl that's used after the invoke_func call to use the type from the ffi list and not the thing we pass in, which is a result. * Remove proxy test for now. * Throw an error if no code. Prior to this External Implementation blocks were output with no body. Now this fix is sort of silly because I need to make EIs work. But in addition if there is a block with no statements, we will now also throw an error. * I don't know I'm on vacation. I worked on some stuff. * Cargo.locks * Miscellaneous Changes Some Cargo updating and some minor changes to the VM. * Update to rustc-hash 2.0.0 The `keys()` method used to return the keys in insertion order, but now returns them in an arbitrary order. This messed up my shit. Now it's fixed. * Two things I added a threadpool to the VM for running lambdas. I cleaned up some of the code handling requests in the http plugin. * More Hardening Check all keys before using them. * Damn Dude I haven't been working on dwarf because of Woog. I'm just getting back into it and I really don't know all that's been done. Recently I fixed importing pre-extruded files. I also fixed a bunch of bugs related to using the new backend. I guess before there was some aliasing going on. * Multiple variable bug If you did something like this: ```rust let x = 10; let x = "foo"; ``` Then sometimes x is in int and sometimes it's a string. That was then. Nwo it always works. * Website compiles -- eventually Fixed a bug where we'd find a type in the store but it wasn't being added to the context's types and thus was being marked as not found. Updated outdated crates. Snafu changed it's interface a bit and it no longer requires the `Location` import. That touched a lot of files. Fixed an FFI bug with the plugins where a `Result` was being typed as `Result` and not `std::result::Result`. * Saving and loading stores is working Ended up using an ordered hash map for the store. Plugins are building. Tests are passing. This should be g2g. * Fix Cargo.toml * Update feature flags to use correct sarzak * Update Rust, and more verbose xtask output - Update Rust to 1.84 - Add more verbose output to xtask plugin output * thrashing * Attempting to fix the dwarf's home. * Trying different value for DWARF_HOME. * xtask fun I updated the install task to create the extruded directory in addition to the compiled directory. Refactored the DWARF_HOME calculation to main instead of having it in each of the install and plugin tasks.
1 parent 98f28b7 commit 3982f61

File tree

406 files changed

+14991
-19160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

406 files changed

+14991
-19160
lines changed

.github/workflows/CI.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,23 @@ jobs:
7070
uses: taiki-e/install-action@cargo-llvm-cov
7171

7272
- name: Install dwarf
73+
env:
74+
DWARF_HOME: /home/runner/.dwarf
7375
run: |
7476
cd dwarf
7577
cargo xtask install
7678
cargo xtask plugin
79+
ls -l ~/.dwarf/
7780
7881
- name: Build and run tests with coverage
7982
run: |
8083
cd dwarf
81-
RUST_MIN_STACK=6291456 cargo llvm-cov --lcov --output-path coverage.lcov --no-default-features --features "multi-vec, repl, async"
84+
RUST_MIN_STACK=6291456 cargo llvm-cov --lcov --output-path coverage.lcov --no-default-features --features "lu-dog-rc, repl, async"
8285
8386
- name: Upload coverage reports to Codecov
8487
uses: codecov/codecov-action@v3
8588
env:
89+
DWARF_HOME: /home/runner/.dwarf
8690
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
8791
with:
8892
working-directory: .

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
**/target
33
*.tracy
44
*.道
5+
crates/lambda
6+
crates/plugin
7+
crates/types
8+
crates/value
9+
.idea
510
woog_structs.rs
611
.dwarf_history
712
coverage.lcov

.vscode/launch.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,26 @@
142142
}
143143
},
144144
"args": [
145+
// "test.ore",
146+
// "tests/harness/extensions/test_ffi/test.ore",
147+
// "tests/proxy/declare.ore",
145148
// "tests/vm_harness/types/map/get.ore",
146149
// "tests/vm_harness/lambda.ore"
147-
"mandelbrot.ore",
150+
// "mandelbrot.ore",
148151
// "https://raw.githubusercontent.com/uberFoo/dwarf/develop/mandelbrot.ore"
149-
// "uberfoo.rs/src/uberfoo.rs.ore",
150-
// "-c",
151-
// "uberfoo.rs/src",
152-
// "-t",
152+
//
153+
"uberfoo.rs/src/uberfoo.rs.ore",
154+
"-c",
155+
"uberfoo.rs/src",
156+
"-t",
157+
//
153158
"-b",
154159
"--uber",
155160
],
156161
"cwd": "${workspaceFolder}",
157162
"env": {
158-
"RUST_LOG": "extruder=debug"
163+
"CLIENT_SECRET": "ff786a55a988bcdcfee228643cc782956d075f8b",
164+
// "RUST_LOG": "vm=trace,async=trace"
159165
},
160166
"preRunCommands": [
161167
"script lldb.debugger.HandleCommand('settings set target.source-map /rustc/{} \"{}/lib/rustlib/src/rust\"'.format(os.popen('rustc --version --verbose').read().split('commit-hash: ')[1].split('\\n')[0].strip(), os.popen('rustc --print sysroot').readline().strip()))"

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"confusables",
1515
"cpus",
1616
"cspan",
17+
"ctsk",
1718
"CVAR",
1819
"defn",
1920
"desanitize",

0 commit comments

Comments
 (0)