Stream: t-compiler/major changes

Topic: `mv src/lib{std,core,alloc,test,etc} std/l compiler-team#298


triagebot (May 29 2020 at 00:43, on Zulip):

A new proposal has been announced #298. It will be brought up at the next meeting.

triagebot (May 29 2020 at 00:59, on Zulip):

@T-compiler: Proposal #298 has been seconded, and will be approved in 10 days if no objections are raised.

pnkfelix (May 29 2020 at 01:39, on Zulip):

We probably should include T-libs in this decision, right?

simulacrum (May 29 2020 at 01:39, on Zulip):

hm so I think per libs-impl attempt, yeah

simulacrum (May 29 2020 at 01:39, on Zulip):

well, rather, eventually we'd say "no"

simulacrum (May 29 2020 at 01:39, on Zulip):

while we're in trial mode it'd make sense though

simulacrum (May 29 2020 at 01:39, on Zulip):

I'll open a thread in the libs zulip stream

pnkfelix (May 29 2020 at 01:40, on Zulip):

eventually we'd say "no" ?

pnkfelix (May 29 2020 at 01:40, on Zulip):

/me is confused

simulacrum (May 29 2020 at 01:40, on Zulip):

t-libs wouldn't own the implementation if the experiment goes well, right?

pnkfelix (May 29 2020 at 01:40, on Zulip):

Oh, is your point that this is just an implementation detail

pnkfelix (May 29 2020 at 01:40, on Zulip):

hmm

pnkfelix (May 29 2020 at 01:40, on Zulip):

I guess that's true

simulacrum (May 29 2020 at 01:41, on Zulip):

I think it makes sense to give a heads up though

mark-i-m (May 29 2020 at 02:13, on Zulip):

Oh, I hadn't even thought of that

mark-i-m (May 29 2020 at 02:13, on Zulip):

thanks @pnkfelix

simulacrum (May 29 2020 at 13:49, on Zulip):

@Steven Fackler responding here to your github post -- we try to keep the major change issues just to status updates -- I think that's already true?

simulacrum (May 29 2020 at 13:49, on Zulip):

Cargo.toml is at / and the crates are all in src/

simulacrum (May 29 2020 at 13:50, on Zulip):

Oh, I guess you mean in each crate?

Steven Fackler (May 29 2020 at 13:50, on Zulip):

Yeah, like this is not the normal layout for a crate: https://github.com/rust-lang/rust/tree/master/src/liballoc

simulacrum (May 29 2020 at 13:50, on Zulip):

hm so I guess under the current proposal that would mean std/libstd/Cargo.toml std/libstd/src/lib.rs

Steven Fackler (May 29 2020 at 13:51, on Zulip):

yeah that seems reasonable

simulacrum (May 29 2020 at 13:51, on Zulip):

I wonder if there's a better name for it other than "std" then at the top level

simulacrum (May 29 2020 at 13:51, on Zulip):

(to avoid confusion since it's not just std, but also e.g. test and proc_macro and such)

Steven Fackler (May 29 2020 at 13:51, on Zulip):

stdlib maybe

Steven Fackler (May 29 2020 at 13:51, on Zulip):

not way more descriptive but at least it's not exactly std

lcnr (May 29 2020 at 13:52, on Zulip):

libs/std

compiler/librustc_middle

seem like good names to me

simulacrum (May 29 2020 at 13:53, on Zulip):

hm, no, I think std is better - we want people unaware to be able to figure out what to do based on an ls in the top directory I think

simulacrum (May 29 2020 at 13:54, on Zulip):

but yeah @Steven Fackler seems like a reasonable thing to change while we're at it -- @mark-i-m mind updating the proposal a bit to include that?

bjorn3 (May 29 2020 at 13:54, on Zulip):

When inside a workspace I prefer not having an src directory inside every crate directory. It is just unnecessary indirection. When the crate is at the top level, it helps separating files like .gitignore, .travis.yml and a docs directory, but when inside a workspace, the source is already in a different directory: the crate directory.

simulacrum (May 29 2020 at 13:55, on Zulip):

I think consistency is preferable, the indirection doesn't really hurt anything?

simulacrum (May 29 2020 at 13:55, on Zulip):

I will say that whenever I go to edit cargo.toml s in rustc today I always get it wrong because I'm used to needing to ../

bjorn3 (May 29 2020 at 13:56, on Zulip):

simulacrum said:

I think consistency is preferable, the indirection doesn't really hurt anything?

If navigating on github it means an extra click, which can be slow, especially on mobile devices.

simulacrum (May 29 2020 at 13:57, on Zulip):

I don't think we need to optimize for that? like, sure, it's true, but ... seems like a very niche thing to do?

simulacrum (May 29 2020 at 13:58, on Zulip):

(maybe I'm unaware and everyone does this)

bjorn3 (May 29 2020 at 13:59, on Zulip):

For me it is very common. I often don't have the latest version of the rust repo pulled, but I need to find how something is implemented. Going through the github ui is faster than updating my local checkout.

simulacrum (May 29 2020 at 14:00, on Zulip):

huh

simulacrum (May 29 2020 at 14:00, on Zulip):

interesting

simulacrum (May 29 2020 at 14:00, on Zulip):

I feel like that says something about git etc

lcnr (May 29 2020 at 14:00, on Zulip):

I frequently search for relevant snippets in the source code when talking about something, which I do by manually typing the required path in the url atm (as traversing folders is slower). So for me it is better to keep paths short.

bjorn3 (May 29 2020 at 14:01, on Zulip):

Same for me @lcnr.

simulacrum (May 29 2020 at 14:02, on Zulip):

I'm uncertain whether getting our crates to look as standard as possible is more important than that hit. Any thoughts @Steven Fackler?

Steven Fackler (May 29 2020 at 14:03, on Zulip):

I think it's generally a good thing for our crate layout to match the layout of ~every other crate I have ever seen

bjorn3 (May 29 2020 at 14:03, on Zulip):

Maybe we can make no src dir the standard for workspaces?

simulacrum (May 29 2020 at 14:04, on Zulip):

yeah I'm feeling similarly, that matching the crate layout is more important

simulacrum (May 29 2020 at 14:04, on Zulip):

obviously if there's a broader change that says "no more src in workspaces" and that's community consensus, then we'd follow that pattern

simulacrum (May 29 2020 at 14:04, on Zulip):

but to my knowledge nothing does that? and every time I move to using workspaces I don't usually put src in path

simulacrum (May 29 2020 at 14:05, on Zulip):

i.e. I'd have a bunch of crates at the top level

simulacrum (May 29 2020 at 14:05, on Zulip):

which is basically what we'll have in the long-term I imagine, a compiler/Cargo.toml workspace and a std/Cargo.toml workspace

nikomatsakis (May 29 2020 at 15:18, on Zulip):

I'm curious if there is a new proposal =)

nikomatsakis (May 29 2020 at 15:19, on Zulip):

I do think it'd be worth settling now on what path we will use, but I support the general idea...

nikomatsakis (May 29 2020 at 15:19, on Zulip):

(and lack strong opinions on the rest)

mark-i-m (May 29 2020 at 19:16, on Zulip):

simulacrum said:

but yeah Steven Fackler seems like a reasonable thing to change while we're at it -- mark-i-m mind updating the proposal a bit to include that?

Done

mark-i-m (May 29 2020 at 19:17, on Zulip):

oh, but now i'm reading the rest of the discussion

mark-i-m (May 29 2020 at 19:19, on Zulip):

updated to reflect that it is an open question (atm)

mark-i-m (Jul 09 2020 at 17:51, on Zulip):

Hey, so I don't know how to make progress on #73265

mark-i-m (Jul 09 2020 at 17:51, on Zulip):

The latest summary is https://github.com/rust-lang/rust/pull/73265#issuecomment-656265128

mark-i-m (Jul 09 2020 at 17:51, on Zulip):

It kind of feels like we should just pick one and do it

mark-i-m (Jul 09 2020 at 17:51, on Zulip):

How should we proceed?

lcnr (Jul 28 2020 at 12:05, on Zulip):

This has now been implemented afaict. Was there a reason to keep backtrace in src instead of library?

mark-i-m (Jul 28 2020 at 15:14, on Zulip):

@lcnr the gimli/backtrace change was reverted and is being redone at https://github.com/rust-lang/rust/pull/74682

mark-i-m (Jul 28 2020 at 15:15, on Zulip):

So you are right that it will eventually live in library/ but it didn't exist at the time of my PR

Last update: May 07 2021 at 08:00UTC