-
Notifications
You must be signed in to change notification settings - Fork 149
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
Unnecessary import-related warnings. #628
Comments
The warnings still stand. The lock file doesn't "remove" the redirect, nor does it invalidate the warning, it just help ensure that if the redirect changed at some point in the future and you deleted your cache, you would get errors, when attempting to run the program. |
Ahh, thank you for this useful info @kitsonk! In that case, can we transfer this issue into I see you're working on a POC called "Pin." I'm wondering if you or anyone else in the community could suggest best practices around minimizing the footprint of imports? My current (haphazard, yellow-lit) approach: I've set up an import map with the following: {
"imports": {
"std/": "https://deno.land/std/",
"esm/": "https://esm.sh",
"x/": "https://deno.land/x/",
"/": "./",
"./": "./"
}
} This way, I don't worry about re-exporting from a central deps file. It's clear where each of these imports points. And the URLs are simple. // From std
import * as asserts from "std/testing/asserts/mod.ts";
// From esm
import ts from "esm/typescript";
// From x
import * as cc from "x/cliffy/command/mod.ts";
// From root
import { myLocalA } from "/my_local_a.ts";
// From current dir
import { myLocalB } from "./my_local_a.ts";
// From parent dir
import { myLocalC } from "../my_local_c.ts"; There are two issues with this (imo simpler) approach:
Ideally, this would be managed by part of the toolchain at "lock" time to spare me the cognitive overhead. Thoughts? |
Let's continue in #777. |
Describe
I'm using a lock file to pin dependency versions & integrity. This means that I'd prefer to specify the short-form of a given import.
For instance...
When I cache my dependencies, I use the following:
And all works beautifully, with no warnings in the command line.
However, the VSCode plugin doesn't pick up on the presence of a lock file, nor does there seem to be a configuration option for ignoring those specific warnings / specifying the lock file.
Screenshots
Versions
Any help on getting rid of these warnings would be greatly appreciated! Thank you!
The text was updated successfully, but these errors were encountered: