profile
viewpoint
Yoshua Wuyts yoshuawuyts Berlin, Germany https://yoshuawuyts.com Software researcher. he/they

choojs/choo 6449

:steam_locomotive::train: - sturdy 4kb frontend framework

browserify/watchify 1767

watch mode for browserify builds

choojs/bankai 1054

:station: - friendly web compiler

choojs/nanohtml 622

:dragon: HTML template strings for the Browser with support for Server Side Rendering in Node.

browserify/rustify 497

Rust WebAssembly transform for Browserify

choojs/nanocomponent 345

🚃 - create performant HTML components

choojs/choo-handbook 264

🚂✋📖 - Learn the choo framework through a set of exercises

browserify/module-deps 199

walk the dependency graph to generate a stream of json output

choojs/awesome-choo 195

🌅 Awesome things related with choo framework

choojs/nanobus 193

🚎 - Tiny message bus

issue commentrust-lang/lang-team

Stream trait and related issues

@nikomatsakis yes, that works for me!

nikomatsakis

comment created time in 4 hours

issue commentrust-lang/rust

async-std docs no longer build on recent nightlies

@Manishearth We've been having some unrelated issues with ARM builds on our CI. That took a while to investigate and eventually disable. My guess is that that's been masking this issue.

That said I haven't done much work on async-std recently, so I may not be completely up to date.

yoshuawuyts

comment created time in 6 hours

issue commentasync-rs/async-std

Shift in performance characteristic between 1.6.2 and master

cc/ @stjepang

Licenser

comment created time in 11 hours

issue commenthttp-rs/tide

req.version() is always None instead of Some(http_types::Version::Http1_1)

@asaaki oops; you're right. It should work now!

asaaki

comment created time in 11 hours

issue commentasync-rs/async-std

Prioritized Merge

Using Stream::merge would make it unpredictable when contraflow is processed and might lead to the unbounded channel to become truly unbounded

[from the rfc] To elaborate, we look at the source as an example. The loop of communication creates the possibility that the source sends an event to the pipeline, blocking at a full queue. At the same time, the pipeline sends an insight to the source, also blocking at a full queue and thus locking forever.

If I understand this correctly you have a system that can generate messages that it itself ingests again. But you want to prioritize messages generated by other systems in all cases. You're using an unbounded queue to store the messages generated from within the system, and a bounded queue for messages generated from outside the system.

If I'm reading this correctly then under pressure the system will always prioritize external messages, and is intended to stop parsing internal messages. This seems like it could cause memory to overflow? Which I believe is the exact problem you were trying to mitigate? -- I feel like I may be missing something.

Either way, related to async-std, this seems like a fairly specific adapter that at least for now may be too precise to include. But it's something interesting to keep in mind, because this can indeed not be expressed with existing patterns as it is.

Licenser

comment created time in 11 hours

issue openedrust-lang/rust

async-std docs no longer build on recent nightlies

Original issue surfaced in: https://github.com/async-rs/async-std/pull/845 by @dignifiedquire. It appears that sometime after 2020-05-01 nightlies are no longer able to build async-std docs. https://github.com/rust-lang/rust/pull/73566 appears to be a likely cause for this regression.

We use a fairly elaborate macro to generate docs, so we're not particularly surprised that a big refactor may have caused issues there. But it'd still be nice if we could get it to work again.

Error

The error message is fairly long and probably not worth posting in full. Luckily it does not appear to be an ICE, just a regression. This is the build that fails: failing build.

created time in 11 hours

startedrust-analyzer/ungrammar

started time in 11 hours

pull request commentasync-rs/async-std

chore: release v1.6.3

@dignifiedquire oooph ://

I've added a comment on the issue you linked so people are notified. But we should probably open a dedicated issue for it on the compiler. It's annoying we now cannot release :(

dignifiedquire

comment created time in 12 hours

pull request commentrust-lang/rust

Don't run `everybody_loops` for rustdoc; instead ignore resolution errors

We suspect this patch may have broken the docs build for async-std. See: https://github.com/async-rs/async-std/pull/845

cc/ @dignifiedquire

jyn514

comment created time in 12 hours

push eventasync-rs/async-std

Ryan Brainard

commit sha c5631996c9a40d14a81762b5770097471654caa8

Match on result (input) not stream (output)

view details

Ryan Brainard

commit sha 50e7cf0e431806efac61b68bd2137df2340204be

Pass in error to log line with placeholder

view details

Yoshua Wuyts

commit sha 19dcced77b99ba9c7680419b9f5f42d5b605a574

Merge pull request #846 from ryanbrainard/book-fix-accept-loop Book: Accept Loop Variable Fixes

view details

push time in 12 hours

PR merged async-rs/async-std

Book: Accept Loop Variable Fixes

In the example accept loop in the book, there are a couple of minor variable errors:

  1. Should be matching on result instead of stream.
  2. The call to eprintln! has a {} placeholder, but e needs to be passed in.
+2 -2

1 comment

1 changed file

ryanbrainard

pr closed time in 12 hours

issue commenthttp-rs/tide

req.version() is always None instead of Some(http_types::Version::Http1_1)

Published async-h1 v2.1.2 which includes @jbr's fix. Running cargo update on your repo should fix this issue!

asaaki

comment created time in 12 hours

created taghttp-rs/async-h1

tagv2.1.2

Asynchronous HTTP/1.1 in Rust

created time in 12 hours

release http-rs/async-h1

v2.1.2

released time in 12 hours

push eventhttp-rs/async-h1

Yoshua Wuyts

commit sha 3a368bd46be1a45a8f41c22a90061cc791b61bcd

v2.1.2

view details

push time in 12 hours

push eventhttp-rs/async-h1

Yoshua Wuyts

commit sha ab7fbd963d67305b05df5f0c70a3506d77f6124a

v2.1.1

view details

Yoshua Wuyts

commit sha 5cafaeb75a890e392f9fbe0b114563245a1e5716

Merge branch 'master' of https://github.com/http-rs/async-h1

view details

push time in 12 hours

issue commentasync-rs/async-std

Prioritized Merge

@Licenser Can you share more about what you need this functionality for? So far it sounds fairly specialized; somewhere between Stream::chain and Stream::merge. I would like to understand better what the rationale behind it is before we consider it for inclusion.

Licenser

comment created time in 12 hours

issue commentasync-rs/async-log

Unsound usage of no_mangle

@Nemo157 Oh that's a fun find; thanks for sharing! Yeah good call to add no_mangle to the unsafe_code lint.

Nemo157

comment created time in 12 hours

issue commenthttp-rs/tide

tide 0.13.0 doesn't compile in linux-arm

cc/ @jbr Do you think we can we find a way around serializing the atomic bool in async-session? IIRC ARM may be polyfilling atomics using spinlocks; it seems there may be a strange interaction there.

Not sure what the right solution here is. Perhaps cast the atomic bool to a regular bool first when serializing? Maybe using a Arc<Mutex<Bool>> achieve much the same result without the serialization problems -- assuming there's no contention this should be fairly fast as well.

prabirshrestha

comment created time in 12 hours

PR opened http-rs/http-types

Typed ETags

Implements typed ETags. Builds on #210. Thanks!

Screenshots

Screenshot_2020-08-03 http_types cache - Rust

+621 -0

0 comment

6 changed files

pr created time in a day

create barnchhttp-rs/http-types

branch : etag

created branch time in a day

issue commentstjepang/async-channel

Implement Sink for Sender

I don't particularly like the Sink trait in both shape and functionality, but am sympathetic to those who do.

My main concern with adding the trait is that it pulls in everything and the kitchen sink (ha) from the futures-util crate. If I'm not mistaken this includes the futures-rs channel impl too.

I would like to recommend that if we add Sink to async-channel we do so exclusive behind a feature flag to ensure async-channel continues to compile quickly.

korrat

comment created time in a day

push eventhttp-rs/http-types

Yoshua Wuyts

commit sha 60a5cd9ede8542838cc5e23864eab2eea94986ce

allow clippy

view details

push time in 2 days

push eventhttp-rs/http-types

Yoshua Wuyts

commit sha 42cdb0c25be94836d859ed4b209f975fe7583917

allow clippy

view details

push time in 2 days

push eventhttp-rs/http-types

Yoshua Wuyts

commit sha e78336e2e74138b9ac1cbd97c6e71c06fe591289

cache mod docs

view details

push time in 2 days

push eventhttp-rs/http-types

Yoshua Wuyts

commit sha 8e2341810f7fd13400dd6bd699c087a8f9c0d2d0

fix cache-control bugs & polish

view details

push time in 2 days

push eventhttp-rs/http-types

Yoshua Wuyts

commit sha 909cbf08fefb1877bc2ce7dc604cea0b3bf4a218

fix cache-control bugs & polish

view details

push time in 2 days

push eventhttp-rs/http-types

Yoshua Wuyts

commit sha 93c3f4c14ee38582f4b7fc9971ce9ae35e096685

test passes

view details

push time in 2 days

push eventhttp-rs/http-types

Yoshua Wuyts

commit sha b68fbe190b04a10db5b8cc48dea8ad2ce033756d

progress

view details

Yoshua Wuyts

commit sha 4864e5e490fc473b65dfbcaed1c9fe799b918da1

finish base impl

view details

push time in 2 days

PR opened http-rs/http-types

Cache control

Started work on Cache-Control headers, as per https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching. I feel like caching is something that could be really interesting to get right for Tide, and probably getting the typed headers in place is the first step to experiment with building more interesting abstractions.

+76 -0

0 comment

3 changed files

pr created time in 3 days

push eventhttp-rs/http-types

Yoshua Wuyts

commit sha d9949505cd63400827a5dd769303195f4abc1d22

Standardize trace headers Brings it in line with the naming of other headers we have; sets us up to remove the unstable feature gate.

view details

Yoshua Wuyts

commit sha 4f6ca0471c50f3ecb169b88ceab000ce58fd8d92

fix trace-context

view details

Yoshua Wuyts

commit sha 445c5fe55371dd83f477059a68dd5872aa7dc032

Make TraceContext::new return Option<Self>

view details

Yoshua Wuyts

commit sha 4ccebc9ff2c595317e20e7617ea149d928a93035

fix failing test

view details

Yoshua Wuyts

commit sha 677e2807e143128d84f0ac02e3f62513f5b7b8f5

Make TraceContext::from_headers return Result<Option<Self>>

view details

Jacob Rothstein

commit sha d8944ce147ee93f6681024846e885736989686e5

enable serde feature on url

view details

Jacob Rothstein

commit sha bbd63d8f5787d0eec38b6218098feefe34451a4b

support anyhow::Error into http_types:Error

view details

Yoshua Wuyts

commit sha a50b9b982fd982e6a1110c39cfc85aea1eae8b2d

Merge pull request #204 from http-rs/standardize-trace Standardize trace

view details

Yoshua Wuyts

commit sha 79f863b31b32be44359a7741dff17ff476da2b40

init Timing-Allow-Origin headers

view details

Yoshua Wuyts

commit sha 43aea7157b54d70c25974ca6a6accb8932ccca36

Finalize Allow-Origin

view details

Yoshua Wuyts

commit sha babd65ec7b0e854454be5cb3723e2eb3ba23328e

Fix clippy warnings

view details

push time in 3 days

create barnchhttp-rs/http-types

branch : cache-control

created branch time in 3 days

push eventhttp-rs/http-types

Yoshua Wuyts

commit sha d9949505cd63400827a5dd769303195f4abc1d22

Standardize trace headers Brings it in line with the naming of other headers we have; sets us up to remove the unstable feature gate.

view details

Yoshua Wuyts

commit sha 4f6ca0471c50f3ecb169b88ceab000ce58fd8d92

fix trace-context

view details

Yoshua Wuyts

commit sha 445c5fe55371dd83f477059a68dd5872aa7dc032

Make TraceContext::new return Option<Self>

view details

Yoshua Wuyts

commit sha 4ccebc9ff2c595317e20e7617ea149d928a93035

fix failing test

view details

Yoshua Wuyts

commit sha 677e2807e143128d84f0ac02e3f62513f5b7b8f5

Make TraceContext::from_headers return Result<Option<Self>>

view details

Yoshua Wuyts

commit sha a50b9b982fd982e6a1110c39cfc85aea1eae8b2d

Merge pull request #204 from http-rs/standardize-trace Standardize trace

view details

push time in 3 days

PR merged http-rs/http-types

Standardize trace

Relies on https://github.com/http-rs/http-types/pull/203; sets up the traceparent headers to match the other trace headers, setting us up for stabilizing these as part of the API. Thanks!

+97 -61

1 comment

2 changed files

yoshuawuyts

pr closed time in 3 days

pull request commenthttp-rs/http-types

Standardize trace

This has been open for a while, and gated behind the "unstable" flag. Merging!

yoshuawuyts

comment created time in 3 days

push eventhttp-rs/tide

Yoshua Wuyts

commit sha 2767410ae8b1f885edddc440ec7d26033a04f2cb

v0.13.0

view details

push time in 3 days

push eventyoshuawuyts/notes

Yoshua Wuyts

commit sha ce8e4d7adf7e5daeed06c0127f5e76b40cb752fe

Update scratchpad.md

view details

push time in 3 days

issue closedhttp-rs/tide

Relation to other modular web frameworks in development?

I see other active ongoing efforts like warp and tower-web, which appear to take a similar philosophy to web frameworks. Does tide aim to be different in some fundamental way? I was mainly wondering why work isn't focusing on one of them.

closed time in 3 days

alexreg

push eventhttp-rs/tide

yusuke ota

commit sha ba33a65790090825b80015382be770cbf8d21883

impl Into<Request> for http_types::Request

view details

Yoshua Wuyts

commit sha d4240b05a692945637a464394f4e9d45147e73bb

Merge pull request #670 from yusuke-ota/Add_http_types_req_into_tide_req impl Into<Request> for http_types::Request

view details

push time in 3 days

PR merged http-rs/tide

impl Into<Request> for http_types::Request

<!--- Provide a general summary of your changes in the Title above --> Implicate Into<tide::Request<State>> for http_types::Request.

Description

<!--- Describe your changes in detail --> Implicate Into<tide::Request<State>> for http_types::Request. This State need trait bound Default because this method use State::default()

Motivation and Context

<!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here. --> This pull request resolve #465 check box "http_types::Request -> tide::Request (Into)".

How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> Simply, run "cargo test" for exist tests.

Types of changes

<!--- What types of changes does your code introduce? Put an x in all the boxes that apply: -->

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

<!--- Go over all the following points, and put an x in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.
  • [ ] I have added tests to cover my changes.
  • [x] All new and existing tests passed.
+6 -0

0 comment

1 changed file

yusuke-ota

pr closed time in 3 days

issue closedhttp-rs/tide

Implement AsRef and Into conversions between tide Requests/Responses and their inner http_types equivalents

this is the tide mirror issue of https://github.com/http-rs/surf/issues/167 this allows for an escape hatch to drop down to apis that might not need to be exposed at the tide level. this would also allow for better interop between surf and tide, such as providing concise support for proxy operations (receive a surf::Response, unwrap it into an http_types::Response, and re-wrap that as a tide::Response)

  • [x] tide::Request -> http_types::Request
    • [x] Into
    • [x] AsRef
  • [x] tide::Response -> http_types::Response
    • [x] Into
    • [x] AsRef
  • [x] http_types::Response -> tide::Response (Into)
  • [ ] http_types::Request -> tide::Request (Into)

closed time in 3 days

jbr

pull request commenthttp-rs/tide

src: move State off of Request (WIP)

One interesting implication of this PR is that it would've made https://github.com/http-rs/tide/pull/670 easier to implement; no State means no Default either.

Fishrock123

comment created time in 3 days

issue commentrust-lang/rust

LLVM error: "Instruction does not dominate all uses!" on Windows

We've been running into this error using Windows MSVC on our work codebase. I've been able to pin down the regression to the Rust 1.44.0 which was part of https://github.com/rust-lang/rust/pull/69033. We've not observed this error occurring on Linux, MacOS, FreeBSD, or Windows-GNU.

cc/ @jonas-schievink

Error

Instruction does not dominate all uses!
  %13219 = phi i8* [ %13219, %13235 ], [ %13219, %13233 ], [ %13219, %13230 ], [ %13219, %13227 ], [ %13219, %13224 ], [ %13219, %13221 ], [ %13219, %12592 ], [ %13219, %12707 ], [ %12837, %12834 ], [ %12831, %12827 ], [ %13219, %12944 ]
  %13219 = phi i8* [ %13219, %13235 ], [ %13219, %13233 ], [ %13219, %13230 ], [ %13219, %13227 ], [ %13219, %13224 ], [ %13219, %13221 ], [ %13219, %12592 ], [ %13219, %12707 ], [ %12837, %12834 ], [ %12831, %12827 ], [ %13219, %12944 ]
Instruction does not dominate all uses!
  %13219 = phi i8* [ %13219, %13235 ], [ %13219, %13233 ], [ %13219, %13230 ], [ %13219, %13227 ], [ %13219, %13224 ], [ %13219, %13221 ], [ %13219, %12592 ], [ %13219, %12707 ], [ %12837, %12834 ], [ %12831, %12827 ], [ %13219, %12944 ]
  %13219 = phi i8* [ %13219, %13235 ], [ %13219, %13233 ], [ %13219, %13230 ], [ %13219, %13227 ], [ %13219, %13224 ], [ %13219, %13221 ], [ %13219, %12592 ], [ %13219, %12707 ], [ %12837, %12834 ], [ %12831, %12827 ], [ %13219, %12944 ]
Instruction does not dominate all uses!
  %13219 = phi i8* [ %13219, %13235 ], [ %13219, %13233 ], [ %13219, %13230 ], [ %13219, %13227 ], [ %13219, %13224 ], [ %13219, %13221 ], [ %13219, %12592 ], [ %13219, %12707 ], [ %12837, %12834 ], [ %12831, %12827 ], [ %13219, %12944 ]
  %13219 = phi i8* [ %13219, %13235 ], [ %13219, %13233 ], [ %13219, %13230 ], [ %13219, %13227 ], [ %13219, %13224 ], [ %13219, %13221 ], [ %13219, %12592 ], [ %13219, %12707 ], [ %12837, %12834 ], [ %12831, %12827 ], [ %13219, %12944 ]
Instruction does not dominate all uses!
  %13219 = phi i8* [ %13219, %13235 ], [ %13219, %13233 ], [ %13219, %13230 ], [ %13219, %13227 ], [ %13219, %13224 ], [ %13219, %13221 ], [ %13219, %12592 ], [ %13219, %12707 ], [ %12837, %12834 ], [ %12831, %12827 ], [ %13219, %12944 ]
  %13219 = phi i8* [ %13219, %13235 ], [ %13219, %13233 ], [ %13219, %13230 ], [ %13219, %13227 ], [ %13219, %13224 ], [ %13219, %13221 ], [ %13219, %12592 ], [ %13219, %12707 ], [ %12837, %12834 ], [ %12831, %12827 ], [ %13219, %12944 ]
Instruction does not dominate all uses!
  %13219 = phi i8* [ %13219, %13235 ], [ %13219, %13233 ], [ %13219, %13230 ], [ %13219, %13227 ], [ %13219, %13224 ], [ %13219, %13221 ], [ %13219, %12592 ], [ %13219, %12707 ], [ %12837, %12834 ], [ %12831, %12827 ], [ %13219, %12944 ]
  %13219 = phi i8* [ %13219, %13235 ], [ %13219, %13233 ], [ %13219, %13230 ], [ %13219, %13227 ], [ %132197 ], [ %13219, %12944 ]
Instruction does not dominate all uses!
  %13219 = phi i8* [ %13219, %13235 ], [ %13219, %13233 ], [ %13219, %13230 ], [ %13219, %13227 ], [ %13219, %13224 ], [ %13219, %13221 ], [ %13219, %12592 ], [ %13219, %12707 ], [ %12837, %12834 ], [ %12831, %12827 ], [ %13219, %12944 ]
  %13219 = phi i8* [ %13219, %13235 ], [ %13219, %13233 ], [ %13219, %13230 ], [ %13219, %13227 ], [ %13219, %13224 ], [ %13219, %13221 ], [ %13219, %12592 ], [ %13219, %12707 ], [ %12837, %12834 ], [ %12831, %12827 ], [ %13219, %12944 ]
in function _ZN8tiberius3tds6stream5token20TokenStream$LT$S$GT$10try_unfold28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$17hbf00841fdd51402aE.llvm.12308354007712700541
LLVM ERROR: Broken function found, compilation aborted!
error: could not compile `quaint`.

After this error the usual error of Instruction does not dominate all uses! in GenFuture follows. Instruction does not dominate all uses! is printed multiple times in our codebase.

Tested versions

I've tested a range of versions on several Windows machines. I reliably got the following results:

version result
1.42.0 MSVC Ok
1.43.0 MSVC Ok
1.44.0 MSVC Error
1.44.1 MSVC Error
1.45.0 MSVC Error
1.45.1 MSVC Error

Repro

The main codebase at work is a rather large one and takes a while to compile. I haven't been able to pin this down to a specific dependency or file that triggers this error yet. Luckily our codebase is open source, which allows people to clone and build it. To do so do:

$ git clone git@github.com:prisma/prisma-engines.git
$ cd prisma-engines
$ cargo build --release

I don't believe we have any peer dependencies aside from a Rust MSVC toolchain to compile on Windows.

kryptan

comment created time in 4 days

push eventhttp-rs/tide

Jacob Rothstein

commit sha 530f93117d8cf66257da0b7fb44ffd3d72f69640

Only run the log middleware once per request

view details

Yoshua Wuyts

commit sha ed7ea863ea8570b41d912c4d26f45a81feff27eb

Merge pull request #662 from jbr/only-log-once Only run the log middleware once per request

view details

push time in 4 days

PR merged http-rs/tide

Only run the log middleware once per request

Currently, nested applications like

async fn main() -> Result<(), std::io::Error> {
    tide::log::start();
    let mut app = tide::new();
    app.at("/").nest({
        let mut api = tide::new();
        api.at("/").get(|_| async { Ok("Hello, world") });
        api
    });
    app.listen("127.0.0.1:8080").await?;
    Ok(())
}

will log twice. This provides a simple mechanism to ensure that a particular middleware is only run once per request. This approach also supports reentrant routing. This approach also requires no sweeping changes to the tide middleware system to ensure only-once middleware behavior, and also allows the middleware to define the desired behavior if it has already run once for the request. For example, a more complex logging middleware might record the time spent in each nested application but only emit that aggregated information once per request

Description

Introduces a private unit struct which is added to request extensions.

How Has This Been Tested?

added a test in tests/log.rs that uses logtest to assert that only one request received log entry is emitted, and only one response sent message is emitted per request/response cycle, even with a nested app. this test previously failed

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] My change requires a change to the documentation.
  • [x] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.
  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

closes: #551

This same pattern should be applied to the cookie middleware as well if this is merged

+48 -6

1 comment

2 changed files

jbr

pr closed time in 4 days

issue openedhttp-rs/tide

Remove Unix Socket on close

@timsuchanek reported an issue with Tide's unix:// handler where on close the socket is kept open on disk. This caused issues when closing and then restarting a server over UDS.

We should ensure that when a Tide server is closed we close the UDS socket too. If need be we can do this synchronously on Drop.

Open question: graceful termination

Something I do wonder though is what happens to any open clients on the other side of the socket when we remove it from the filesystem. I would imagine they just get an error on the next system call since the fd no longer exists? The alternative is that they time out since the server is no longer active and responding.

Probably the right solution in the future is to enable graceful termination of connections so that we can send a signal to the application, and then stop accepting new connections before the application exits. We should also enable this on async drop when it lands; but that may be further out.

created time in 4 days

push eventhttp-rs/tide

Jacob Rothstein

commit sha 08132a63d536d11dc6c4fe3c0c012898c82c51d5

remove experimental warning

view details

Jacob Rothstein

commit sha 1a7aa4c1099a86860497cff6d7e542492993be1a

clarify "Stability"

view details

Yoshua Wuyts

commit sha 0ff17a3f1d0abdb8268fcba92dbcbb185a2ca18e

Merge pull request #667 from jbr/remove-experimental-warning Remove experimental warning

view details

push time in 4 days

PR merged http-rs/tide

Remove experimental warning
+2 -3

0 comment

2 changed files

jbr

pr closed time in 4 days

push eventhttp-rs/http-types

Yoshua Wuyts

commit sha 4b032739d7b300ff57f51fda34ea52408c254b21

Fix clippy warnings

view details

push time in 4 days

PR opened http-rs/http-types

Timing allow origin

Add structured Timing-Allow-Origin headers, further rounding out the trace submodule.

+328 -3

0 comment

4 changed files

pr created time in 4 days

push eventhttp-rs/http-types

Yoshua Wuyts

commit sha 246078d67c7907df36621614bca1fd110d3ca6af

Finalize Allow-Origin

view details

push time in 4 days

push eventhttp-rs/tide

Yoshua Wuyts

commit sha 915c7f80e8952fa8b46e5f2d347487bd5071c0ac

Rename .middleware to .with

view details

Yoshua Wuyts

commit sha e3602c22712077ac36da2cabad1567ed43e19d6f

cargo fmt

view details

Yoshua Wuyts

commit sha d9c20405a1400e8ba397b98103b3a38233a3cc02

Merge pull request #666 from http-rs/server-with Rename .middleware to .with

view details

push time in 4 days

PR merged http-rs/tide

Rename .middleware to .with

Renames {Route, Server}::middleware to {Route, Server}::with. Closes #665.

+46 -48

0 comment

13 changed files

yoshuawuyts

pr closed time in 4 days

issue closedhttp-rs/tide

Rename Server::middleware to Server::with

Initially the Server::middleware method was chosen because Server::use isn't possible as it's a reserved keyword. The idea was to resemble Express's choice of naming. So instead of using a verb I chose to just name it what it is in the expectation that we could later find a suitable verb.

As I was doing some work with the tracing crate today I noticed they use the with method to compose various Layers. This is much the same as our middleware, and actually fits well. The with function name in the stdlib is also canonically used to add a function that the item is passed through first.

So I'd like to propose we rename Server::middleware to Server::with, bringing it in line with the other Server methods such as Server::at, Server::nest, Server::listen.

Example

With this change:

let mut app = tide::new();
app.with(MyMiddleware::new());
app.at("/").get(|_| async move { Ok("hello chashu") });
app.listen("localhost:8080").await?;

Without this change:

let mut app = tide::new();
app.middleware(MyMiddleware::new());
app.at("/").get(|_| async move { Ok("hello chashu") });
app.listen("localhost:8080").await?;

Future

The expectation is that we'll eventually have async closures, which would allow us to author this with anonymous middleware from closures, which would make with an even more accurate nomer.

let mut app = tide::new();
app.with(async |req, next| {
    println!("incoming {} method", req.method();
    next().await
});
app.at("/").get(async try |_| "hello chashu");
app.listen("localhost:8080").await?;

closed time in 4 days

yoshuawuyts

issue commenthttp-rs/tide

Rename Server::middleware to Server::with

@Fishrock123 haaa, yes probably!

yoshuawuyts

comment created time in 4 days

push eventyoshuawuyts/notes

Yoshua Wuyts

commit sha 2ff63c0aefb134474feffdc17aac5ee711b5e920

Create scratchpad.md

view details

Yoshua Wuyts

commit sha 79fbff64dc42ab917f250dd828e6c1e1b8f57fc3

Update scratchpad.md

view details

Yoshua Wuyts

commit sha 8c5a6e927c15783ea68946e29b8822b42adc3b63

Update cancellation.md

view details

Yoshua Wuyts

commit sha 86068db219c85ec8b2122017e3381abf8edb43d8

Merge branch 'master' of https://github.com/yoshuawuyts/notes

view details

push time in 4 days

push eventyoshuawuyts/speaking

Yoshua Wuyts

commit sha 617d649afa4dff9a9ab6cdfa096b06676507566d

Create 2020-rustlab.md

view details

push time in 4 days

Pull request review commentprisma/prisma-engines

Add DestructiveChangeChecker::pure_check()

 impl SqlDestructiveChangesChecker<'_> {             }         } +        plan+    }++    #[tracing::instrument(skip(self, steps, before), target = "SqlDestructiveChangeChecker::check")]

Cool!

tomhoule

comment created time in 4 days

Pull request review commentprisma/prisma-engines

Add DestructiveChangeChecker::pure_check()

 where      /// Check destructive changes resulting of reverting the provided migration.     async fn check_unapply(&self, database_migration: &T) -> ConnectorResult<DestructiveChangeDiagnostics>;++    /// Check the database migration without performing any IO.

By "check" do you mean "validate this migration is correct"?

tomhoule

comment created time in 4 days

Pull request review commentprisma/prisma-engines

Datamodel Parser: add module docs

+//! The data structures in this crate are organized into 3 layers:+//! * The AST layer contains the data data structures representing the schema input.+//! * The model layer contains the data structures that are semantically rich and therefore engines can build upon.+//! * The JSON layer contains the data structures that represent the contract for the DMMF.+//!+//! The responsibilities of each top level module is as following:+//! * `common`: contains constants and generic helpers+//! * `error`: contains the error and result types+//! * `ast`: contains the data structures for the AST of a Prisma schema. And the parsing functions to turn an input string into an AST.+//! * `dml`: contains the models representing the Datamodel part of a Prisma schema+//! * `configuration`: contains the models representing the Datasources and Generators of a Prisma schema+//! * `transform`: contains the logic to turn an AST into models and vice versa+//! * `json`: contains the logic to turn models into their JSON/DMMF representation+//!+//! The flow between the layers is depicted in the following diagram.+//!+//!                ┌──────────────────┐

Or is there a benefit to publish them to docs.rs and look at them there?

Oh, I was thinking about the way this would render in cargo doc locally.

mavilein

comment created time in 4 days

Pull request review commentprisma/prisma-engines

Datamodel Parser: add module docs

 use super::*; /// string, only introspection and the lowering of the datamodel to the ast care about these flags. /// The FieldType: Unsupported behaves in the same way. /// Both of these are never converted into the internal datamodel.--/// Represents a prisma-datamodel. #[derive(Debug, PartialEq, Clone)] pub struct Datamodel {-    /// All enums.     pub enums: Vec<Enum>,-    /// All models.     pub models: Vec<Model>, }

Did you mean to delete these comments?

mavilein

comment created time in 4 days

Pull request review commentprisma/prisma-engines

Datamodel Parser: add module docs

+//! The data structures in this crate are organized into 3 layers:+//! * The AST layer contains the data data structures representing the schema input.+//! * The model layer contains the data structures that are semantically rich and therefore engines can build upon.+//! * The JSON layer contains the data structures that represent the contract for the DMMF.+//!+//! The responsibilities of each top level module is as following:+//! * `common`: contains constants and generic helpers+//! * `error`: contains the error and result types+//! * `ast`: contains the data structures for the AST of a Prisma schema. And the parsing functions to turn an input string into an AST.+//! * `dml`: contains the models representing the Datamodel part of a Prisma schema+//! * `configuration`: contains the models representing the Datasources and Generators of a Prisma schema+//! * `transform`: contains the logic to turn an AST into models and vice versa+//! * `json`: contains the logic to turn models into their JSON/DMMF representation+//!+//! The flow between the layers is depicted in the following diagram.+//!+//!                ┌──────────────────┐+//!                │       json       │+//!                └────────▲─────────┘+//!                         │+//!                         │+//!      ┌──────────────────┐┌──────────────────┐+//!      │       dml        ││  configuration   │+//!      └──────────────────┘└──────────────────┘+//!                        │  ▲+//!┌─────────────────────┐ │  │ ┌─────────────────────┐+//!│transform::dml_to_ast│ │  │ │transform::ast_to_dml│+//!└─────────────────────┘ │  │ └─────────────────────┘+//!                        │  │+//!                        ▼  │+//!                ┌──────────────────┐+//!                │       ast        │+//!                └──────────────────┘+//!                        │  ▲+//!                        │  │+//!                        │  │+//!                        ▼  │+//!                 ┌──────────────────┐+//!                 │  schema string   │+//!                 └──────────────────┘+//!+//!+//! The usage dependencies between the main modules is depicted in the following diagram.+//! The modules `error` and `common` are not shown as any module may depend on them.+//!+//!                       ┌──────────────────┐

How is this rendered in rustdoc? Should this be captured in a code block of type txt?

mavilein

comment created time in 4 days

Pull request review commentprisma/prisma-engines

Datamodel Parser: add module docs

+//! The data structures in this crate are organized into 3 layers:+//! * The AST layer contains the data data structures representing the schema input.+//! * The model layer contains the data structures that are semantically rich and therefore engines can build upon.+//! * The JSON layer contains the data structures that represent the contract for the DMMF.+//!+//! The responsibilities of each top level module is as following:+//! * `common`: contains constants and generic helpers+//! * `error`: contains the error and result types+//! * `ast`: contains the data structures for the AST of a Prisma schema. And the parsing functions to turn an input string into an AST.+//! * `dml`: contains the models representing the Datamodel part of a Prisma schema+//! * `configuration`: contains the models representing the Datasources and Generators of a Prisma schema+//! * `transform`: contains the logic to turn an AST into models and vice versa+//! * `json`: contains the logic to turn models into their JSON/DMMF representation+//!+//! The flow between the layers is depicted in the following diagram.+//!+//!                ┌──────────────────┐

How is this rendered in rustdoc? Should this be captured in a code block of type txt?

mavilein

comment created time in 4 days

Pull request review commentprisma/prisma-engines

Datamodel Parser: add module docs

+pub struct RelationNames {}++impl RelationNames {+    /// generates a name for relations that have not been explicitly named by a user+    pub fn name_for_unambiguous_relation(from: &str, to: &str) -> String {+        if from < to {+            format!("{}To{}", from, to)+        } else {+            format!("{}To{}", to, from)+        }+    }++    pub fn name_for_ambiguous_relation(from: &str, to: &str, scalar_field: &str) -> String {

Did you mean to add a doc comment here too?

mavilein

comment created time in 4 days

pull request commentmongodb/mongo-rust-driver

RUST-452 Fix tests with async-std 1.6.x

@saghm yay, exciting!

saghm

comment created time in 4 days

push eventhttp-rs/tide

Yoshua Wuyts

commit sha e3602c22712077ac36da2cabad1567ed43e19d6f

cargo fmt

view details

push time in 5 days

PR opened http-rs/tide

Rename .middleware to .with

Renames {Route, Server}::middleware to {Route, Server}::with. Closes #665.

+46 -46

0 comment

13 changed files

pr created time in 5 days

create barnchhttp-rs/tide

branch : server-with

created branch time in 5 days

issue commenthttp-rs/tide

Rename Server::middleware to Server::with

@jbr yeah!

yoshuawuyts

comment created time in 5 days

push eventyoshuawuyts/notes

Yoshua Wuyts

commit sha 78bcfa99640aa6a24119f8812b3c8f67d604c195

Update rust.md

view details

push time in 5 days

starteddavidbarsky/tracing-tree

started time in 5 days

issue openedhttp-rs/tide

Rename Server::middleware to Server::with

Initially the Server::middleware method was chosen because Server::use isn't possible as it's a reserved keyword. The idea was to resemble Express's choice of naming. So instead of using a verb I chose to just name it what it is in the expectation that we could later find a suitable verb.

As I was doing some work with the tracing crate today I noticed they use the with method to compose various Layers. This is much the same as our middleware, and actually fits well. The with function name in the stdlib is also canonically used to add a function that the item is passed through first.

So I'd like to propose we rename Server::middleware to Server::with, bringing it in line with the other Server methods such as Server::at, Server::nest, Server::listen.

Example

With this change:

let mut app = tide::new();
app.with(MyMiddleware::new());
app.at("/").get(|_| async move { Ok("hello chash") });
app.listen("localhost:8080").await?;

Without this change:

let mut app = tide::new();
app.middleware(MyMiddleware::new());
app.at("/").get(|_| async move { Ok("hello chash") });
app.listen("localhost:8080").await?;

created time in 5 days

push eventhttp-rs/tide

Yoshua Wuyts

commit sha f4885ba17ad01600d989d88c3cc96e5712c4eb8c

update mongodb sessions

view details

push time in 5 days

delete branch yoshuawuyts/flamegraph

delete branch : fix-default-sample-rate

delete time in 6 days

startedethanboxx/tide-tracing

started time in 6 days

issue closedhttp-rs/http-types

Implement Stream for Body

Hyper implements Stream for the Body type, while http-types doesn't.

I wanted to use multer for async multipart parsing, but it primarily works on streams (or alternatively a Tokio reader, which won't work in this case either).

Would it make sense to implement Stream for http_types::Body as well? If yes, and if you'd give me some pointers, I might even come up with an implementation (as long as it's not too complex).

closed time in 6 days

dbrgn

push eventyoshuawuyts/notes

Yoshua Wuyts

commit sha fe1b760756f385d7185db978a5179a64cf4f3152

exercise + mcp

view details

push time in 6 days

fork yoshuawuyts/wg-traits

Home of the "traits working group", affiliated with the compiler and lang teams.

https://rust-lang.github.io/wg-traits/

fork in 6 days

MemberEvent

push eventprisma/prisma-engines

Yoshua Wuyts

commit sha de74f516dc0e26e3375b584c545c276cd513612b

remove exclusive flag options

view details

Yoshua Wuyts

commit sha 449c5991a0b43547b89ae541bd1f1c3303e0d40c

Merge pull request #948 from prisma/remove-exlusion remove exclusive flag options

view details

push time in 6 days

delete branch prisma/prisma-engines

delete branch : remove-exlusion

delete time in 6 days

PR merged prisma/prisma-engines

remove exclusive flag options

@timsuchanek is reporting a stack overflow when using --unix-path. I've triggered a stack overflow through this before as well. This patch temporarily removes that to validate that that is not the cause of the problem. Thanks!

+2 -2

1 comment

1 changed file

yoshuawuyts

pr closed time in 6 days

pull request commentprisma/prisma-engines

remove exclusive flag options

Got a repro locally on Linux (WSL) and confirmed this patch fixes the issue. Successfully started the server through:

$ cargo run --bin query-engine -- --unix-path='/tmp/prisma-test.sock' --datamodel-path=./datamodel_v2.prisma

@timsuchanek something worth noting here is that the socket path does not require to be prefixed with unix://.

yoshuawuyts

comment created time in 6 days

created taghttp-rs/async-h1

tagv2.1.1

Asynchronous HTTP/1.1 in Rust

created time in 6 days

release http-rs/async-h1

v2.1.1

released time in 6 days

push eventyoshuawuyts/async-mongodb-session

Irina Shestak

commit sha 190556a1fd630a222b9200093cd4bd96655f2203

correct irina's email

view details

Yoshua Wuyts

commit sha 88b6d65b479e46ad517215eded33caebe3128455

Merge pull request #5 from lrlna/patch-1 correct irina's email

view details

push time in 6 days

PR merged yoshuawuyts/async-mongodb-session

correct irina's email

(could I also request write access please @yoshuawuyts)

+1 -1

0 comment

1 changed file

lrlna

pr closed time in 6 days

issue commentprisma/prisma-engines

EPIC: Embeds

Triage: this will also be relevant for embedded JSON / embedded XML in SQL databases. This needs work from product.

mavilein

comment created time in 6 days

issue commentprisma/prisma-engines

IE: Not recognizing string type

Triage: no change

pimeys

comment created time in 6 days

issue closedprisma/prisma-engines

Guide for contributors

I love what Prisma is doing, changing the way to consume Databases.

I want to contribute with Prisma project, working on MSSQL connector for Prisma Engine, but I wasn't able to found any Documentation regarding guidelines.

It'll be awesome to have some guidance to collaborate on this path.

closed time in 6 days

daniloraisi

issue commentprisma/prisma-engines

Guide for contributors

Closing in favor of https://github.com/prisma/prisma-engines/issues/890

daniloraisi

comment created time in 6 days

issue commentprisma/prisma-engines

Cascading Deletes - Implementation Strategy for SQL connector

Triage: no change

mavilein

comment created time in 6 days

issue commentprisma/prisma-engines

Create a migration engine <-> introspection engine test setup

Triage: no change

tomhoule

comment created time in 6 days

issue commentprisma/prisma-engines

Add tests using Yugabyte DB

Triage: the target outcome here is to find out whether it passes our test suite.

janpio

comment created time in 6 days

issue commentprisma/prisma-engines

Add tests using Cockroach DB

Triage: the target outcome here is to find out whether it passes our test suite.

janpio

comment created time in 6 days

issue commentprisma/prisma-engines

Transaction is a problematic reserved word

Triage: this is being discussed by product

defrex

comment created time in 6 days

issue commentprisma/prisma-engines

Improve error for nonexistent column in SQLite

Triage: this is fairly straightforward to fix and we should do it

timsuchanek

comment created time in 6 days

issue closedprisma/prisma-engines

Export all test datamodels

  1. "Copy paste" (or overwrite database.setup to put it into a file) all hand written datamodels from the tests
  2. Write a test that generates all the variations from nestedMutations tests and outputs them into file(s)
  3. Write a migrate script to import all of those into databases (SQLite, Postgres, MySQL)
  4. Put these databases into Introspection CI

closed time in 6 days

janpio

PR merged yoshuawuyts/async-mongodb-session

Fix store_session impl

Fixes https://github.com/yoshuawuyts/async-mongodb-session/issues/3. Thanks!

+6 -5

0 comment

1 changed file

yoshuawuyts

pr closed time in 6 days

more