Oct. 1st, 2013

tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
Once #9654 lands (after ~ 24 hours in the queue, it finally started building only to fail because of an overly long line... and I thought I checked that every time I pushed a new version, but apparently not), we'll have completed the "build Servo with rustpkg" milestone. The next milestone is the first part of community adoption, which, roughly speaking, is the list of features we think rustpkg has to have in order for it to get widespread use in the Rust community (such as it is).

The first thing on that list, which I started working on today, is #6480: making locally-cached copies of source files that rustpkg automatically fetched from github (or, in the future, elsewhere) read-only. The intent behind this bug is to prevent a sad situation -- that really happened to a Go developer, and could happen again with a similar package manager -- where somebody makes local changes to packages that their projects depends on without realizing they're editing automatically-fetched files, and then loses those changes when they redistribute the code (without their local changes).

One solution is for rustpkg to make any source files that it automatically fetches read-only. Of course, anybody can just change the permissions, but that requires deliberate action and (with hope) will remind people that they might be making a poor life decision. That's easy enough to implement, and in fact, I implemented it today.

But I realized that this really goes along with another issue I filed, #9514. Servo depends on many packages that the Servo developers are also hacking on in tandem with hacking on Servo -- so if we started making everything read-only, that would make it hard to work with local (uncommitted) changes.

I think the right thing to do (and as per discussion in meetings, it sounds like it's the general consensus) is to make rustpkg do two things differently: (1) store fetched sources in a subdirectory of a workspace's build directory, not its src directly (it's less confusing if src is only things you created yourself); and (2) always search for sources under src before searching under build. That way, if you want to make local changes to a package that you refer to with an extern mod that points to a remote package, you can manually git clone the sources for it under a workspace's src directory, and then rustpkg will automatically find your locally-changed copy (which it will also never overwrite with newly fetched sources).

I looked at what Go does, and it looks like it does more or less what I want to do in rustpkg: "By default, get uses the network to check out missing packages but does not use it to look for updates to existing packages." So, the only case where rustpkg will pull a fresh copy of a repository off github is if there's no local copy of the sources, or installed version of the binaries for it, that can be found by searching the RUST_PATH.
tim: Mike Slackernerny thinking "Scientific progress never smelled better" (science)
Open to: Registered Users, detailed results viewable to: All, participants: 31


Which of the following vegetables would you generally peel before cooking with?

View Answers

potatoes
7 (22.6%)

parsnips
18 (58.1%)

carrots
17 (54.8%)

beets
12 (38.7%)

ginger
21 (67.7%)

butternut squash
21 (67.7%)

zucchini
1 (3.2%)

kabocha squash
10 (32.3%)

pumpkin
19 (61.3%)

cucumbers
4 (12.9%)

None of the above
0 (0.0%)

I have never cooked any of these vegetables
0 (0.0%)

I don't eat vegetables
0 (0.0%)

I don't cook
1 (3.2%)

I don't eat
0 (0.0%)

Which of the following fruits would you generally peel before eating (raw)?

View Answers

mangoes
22 (73.3%)

peaches
6 (20.0%)

plums
0 (0.0%)

apricots
2 (6.7%)

kiwi fruit
16 (53.3%)

apples
2 (6.7%)

grapes
0 (0.0%)

None of the above
5 (16.7%)

I have never eaten any of these fruits
0 (0.0%)

I don't eat fruit
1 (3.3%)

I don't eat
0 (0.0%)

Profile

tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
Tim Chevalier

November 2021

S M T W T F S
 123456
78 910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags