Comments (4)
I'm currently in the midst of a big refactor and the create_graph
function doesn't exist anymore.
After #219 lands, I'm going to upgrade the other crates and then I'm working on integration for the new API here denoland/deno#17692
Another question I have , is , shall we add one element in Module struct or Specifier our absolute remote Url which may change on requesting and when we want to vendor it , it doesn't build with main package name and it could be strange name with path . I have just PR on
deno
which resolved this issue but wonder if we can create vendored path with main package name in importing . appreciate to help out and permit me to do it.
Could you give an example of what you mean? To help demonstrate the issue, you might want to add a test in denoland/deno#17670 that follows what I outlined here denoland/deno#17670 (comment) -- I believe deno_graph::ModuleGraph
should already have most information we need like redirected specifiers and such.
from deno_graph.
I'm currently in the midst of a big refactor and the
create_graph
function doesn't exist anymore.
Oh , that's great .
Could you give an example of what you mean?
For example if you are going to vendor this link code on file like issue which mention in my PR :
import { load } from "https://x.nest.land/[email protected]/mod.ts";
const env = await load({})
It makes graph by this crate , first module is this file because of scheme is file
, then it going to parse it and vendor it . am i right ?
but when graph wants to load data from this url on importing it will convert to this domain and host :
{ dependencies: {"./src/mod.ts": Dependency { maybe_code: Ok { specifier: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("krnvmnln2bt6577673oo4rze3ntyki3ob24k2qyxhsibzkqz6qaq.arweave.net")), port: None, path: "/VFtWNW3QZ-7__v7c7kck22eFI24OuK1DFzyQHKoZ9AE/src/mod.ts", query: None, fragment: None } ... }
this host and domain is on loading data url from this package https://x.nest.land/[email protected]/mod.ts
,
this issue is happing on this crate not deno
, on my PR it bypass this error , but folder name which vendored package is save is this domain and its path and this will be strange for user .
I can easily add test on PR , but I think if we can solve on exact problem with this crate will be great too .
if we can add absolute domain and url will be great .
or better way is you know what happened with the domain and path on this crate and saved to Module too , to can resolve it on deno
crate only .
from deno_graph.
@dsherret
The Module doesn't contain information about url and domain of which imported package is ,
And I think redirect happens in this exmaple , Graph module follow redirects ?
hope you got what I am saying.
from deno_graph.
The ModuleGraph
should contain the redirected specifier in the redirects
property. Then each module and dependency should contain the resolved specifier. The unresolved specifier in the dependencies
property of a Module
is the key. I don't think there's anything to solve in deno_graph itself, but if you can demonstrate a test that shows the issue that would be helpful. I believe in this case it's an issue with deno vendor
not handling redirects to different hosts.
from deno_graph.
Related Issues (20)
- Associate import map `@types/<entry-name>` entry as types for `<entry-name>`? HOT 1
- Tracing - Add tests for going to a symbol dep's definition HOT 1
- Refactor type tracing to lazy symbol graph
- Add cache for fast check HOT 1
- getting error when building deno from source HOT 2
- Panic with multiple reexports and namespace HOT 1
- Fast check - Ensure works with @deno-types and triple slash references
- Implement `yanked` handling for JSR HOT 1
- Decrease range of some fast check diagnostics
- Standard way of resolving import maps HOT 6
- Support inferring function signature types in subset type checking
- Add code coverage
- Zap tries to zap d.ts files HOT 1
- Do not remove `// @ts-ignore` comments in zap
- Graph segment() should clone information about packages
- Ability to sort fast check diagnostics HOT 1
- When fast check fails on a package, it should fast check all the package's dependencies
- Optimize futures for JSR package loading
- JS `createGraph` modifies objects returned by `load`
- Module analyzer does not recognize triple-slash directive or `@jsxImportSource` pragma following hashbang comment HOT 2
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 deno_graph.