-
Notifications
You must be signed in to change notification settings - Fork 526
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
Added external files. #6223
Added external files. #6223
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 16 of 16 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Arcticae, @Draggu, @mkaput, and @piotmag769)
63cd7fb
to
b23f1ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 16 of 16 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, @orizi, and @piotmag769)
crates/cairo-lang-filesystem/src/ids.rs
line 65 at r1 (raw file):
OnDisk(PathBuf), Virtual(VirtualFile), External(u32),
please add:
struct ExternalFileId(u32)
to hide u32
as implementation detail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, @mkaput, and @piotmag769)
crates/cairo-lang-filesystem/src/ids.rs
line 65 at r1 (raw file):
Previously, mkaput (Marek Kaput) wrote…
please add:
struct ExternalFileId(u32)to hide
u32
as implementation detail
this becomes a salsa::InternId
in a followup PR - so not really sensible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, @orizi, and @piotmag769)
crates/cairo-lang-filesystem/src/ids.rs
line 65 at r1 (raw file):
Previously, orizi wrote…
this becomes a
salsa::InternId
in a followup PR - so not really sensible.
salsa::InternId
is also an implementation-detail-kind type just like u32
, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 16 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, @orizi, and @piotmag769)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Arcticae, @Draggu, @orizi, and @piotmag769)
crates/cairo-lang-filesystem/src/db.rs
line 111 at r1 (raw file):
/// A trait for defining files external to the `filesystem` crate. pub trait ExternalFiles {
why couldn't this be just a new query group?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Arcticae, @Draggu, @mkaput, and @piotmag769)
crates/cairo-lang-filesystem/src/db.rs
line 111 at r1 (raw file):
Previously, mkaput (Marek Kaput) wrote…
why couldn't this be just a new query group?
how would that work?
the idea is using it by a QueryGroup that already depends on filesystem - so that would be a cyclic dependency.
crates/cairo-lang-filesystem/src/ids.rs
line 65 at r1 (raw file):
Previously, mkaput (Marek Kaput) wrote…
salsa::InternId
is also an implementation-detail-kind type just likeu32
, isn't it?
but that wrap is meaningless.
the entire idea is that it is an external implementation using another query - the wrapper type would not solve anything.
039fad4
to
efc94cf
Compare
commit-id:dd8a62c8
efc94cf
to
315792e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, @orizi, and @piotmag769)
crates/cairo-lang-filesystem/src/db.rs
line 111 at r1 (raw file):
Previously, orizi wrote…
how would that work?
the idea is using it by a QueryGroup that already depends on filesystem - so that would be a cyclic dependency.
closing this thread, I'll open new one with my recent thoughts on this
crates/cairo-lang-filesystem/src/ids.rs
line 65 at r1 (raw file):
Previously, orizi wrote…
but that wrap is meaningless.
the entire idea is that it is an external implementation using another query - the wrapper type would not solve anything.
yeah, you're right it's meaningless in this context. resolving this thread but I'll post my thoughts in another one
crates/cairo-lang-filesystem/src/ids.rs
line 66 at r2 (raw file):
Virtual(VirtualFile), External(u32), }
The more I think and try to reason about this, the more I believe this is an unnecessary abstraction. Why can't we just put plugin generated file ID here directly? This should reduce much of the indirections that are happening here, and thus make the code easier to reason about + I really don't believe we'll need another file generation method anytime soon.
Suggestion:
pub enum FileLongId {
OnDisk(PathBuf),
Virtual(VirtualFile),
PluginGenerated(PluginGeneratedFileId),
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, @mkaput, and @piotmag769)
crates/cairo-lang-filesystem/src/ids.rs
line 66 at r2 (raw file):
Previously, mkaput (Marek Kaput) wrote…
The more I think and try to reason about this, the more I believe this is an unnecessary abstraction. Why can't we just put plugin generated file ID here directly? This should reduce much of the indirections that are happening here, and thus make the code easier to reason about + I really don't believe we'll need another file generation method anytime soon.
this is a circular dependency - the entire idea is to break it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Arcticae, @Draggu, and @piotmag769)
Stack:
defs
plugins files to be based on external files. #6225This change is