Comments (10)
I can't reproduce on linux, I can run failure.ts many times without error
from dax.
Are you sure? The reproduction code fail on both a physical linux machine and codespaces for me.
Codespaces:
deno 1.34.1 (release, x86_64-unknown-linux-gnu)
v8 11.5.150.2
typescript 5.0.4
Local:
deno 1.33.4 (release, x86_64-unknown-linux-gnu)
v8 11.4.183.2
typescript 5.0.4
I made a repo out of it to keep it simple
https://github.com/Hexagon/dax-issue-146
from dax.
yeah the repo you linked also work
but funny thing I found, turns out deno lsp listen to port 8084 by default, so that might be the issue ? can you try using a different port ?
from dax.
or maybe no, let me pr some fixes to that repo, so we can test there more
from dax.
Can you try here https://github.com/sigmaSd/dax-issue-146 (this makes sure that dax have the latest version)
and can you kill -9 deno before starting just for sanity check
from dax.
Aaah, your version work fine. But it is because the server exit gracefully before dax tries to kill the process, if I add the server code to your version, it starts failing again (because the process is kept alive until it's killed by dax).
// Connections to the server will be yielded up as an async iterable.
for await (const conn of server) {
// In order to not be blocking, we need to handle each connection individually
// without awaiting the function
serveHttp(conn);
}
async function serveHttp(conn: Deno.Conn) {
// This "upgrades" a network connection into an HTTP connection.
const httpConn = Deno.serveHttp(conn);
// Each request sent over the HTTP connection will be yielded as an async
// iterator from the HTTP connection.
for await (const requestEvent of httpConn) {
// The native HTTP server uses the web standard `Request` and `Response`
// objects.
const body = `Your user-agent is:\n\n${
requestEvent.request.headers.get("user-agent") ?? "Unknown"
}`;
// The requestEvent's `.respondWith()` method is how we send the response
// back to the client.
requestEvent.respondWith(
new Response(body, {
status: 200,
}),
);
}
}
from dax.
I see, this is an issue with abortcontroller , here is a minimal example, I think you should close this issue and open one against deno repo
const control = new AbortController();
const child = new Deno.Command("deno", {
// args: ["run","-A", "main.ts"], // works
args: ["task", "prod"], // fails
signal: control.signal,
}).spawn();
await new Promise((r) => setTimeout(r, 1000));
control.abort();
await child.status;
from dax.
or maybe its an issue with how deno task works
from dax.
actually here is the issue already denoland/deno#18445
from dax.
Ooh, cool. Thanks for checking it up 💯
from dax.
Related Issues (20)
- Logging object as argument should not print [object Object]
- Upgrade dependency deno_task_shell to 0.14.2
- Merged streams make it unable to access streams HOT 1
- Panic on stderr redirect
- Make it easier to pipe to files HOT 3
- Patch for deprecation warnings in console/utils.ts HOT 2
- Redesign command and internal streams
- Ability to cancel a request HOT 1
- Support for subshells breaks escaped parentheses HOT 1
- Rename `PathRef` to `Path`
- Support providing a `CommandBuilder` to a template literal expr HOT 1
- built-in 'cat' command does not work with absolute paths
- Add `.linesIter()`
- Support glob expansion
- Path - Copy dir recursive
- Strict typing for arguments HOT 1
- Strange issue when upgrading Deno HOT 3
- $.prompt doesn't support utf-8? HOT 1
- add command for `tar` HOT 2
- imagemagick hangs 😞
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dax.