Jul. 31st, 2013

tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
Finished the big pull request for extending what extern mod can name, and other stuff! That was... way more work than I expected, even when taking into account Hofstadter's Law.

I'd say more, but I want to get out of the office. Next priority is workcache (you know, so rustpkg can actually be a non-ridiculous replacement for make...); I should also be able to get #6409 out of the way in the foreseeable future.

No wait, one more thing! The very next thing I do will to be to get rid of the local_path / remote_path hack. See, right now, in rustpkg, package IDs look something like:

struct PackageId {
    short_name: ~str,
    local_path: LocalPath,
    remote_path: RemotePath,
    version: Version
}

LocalPath and RemotePath are both just newtype'd Paths (where Path is a path on the filesystem -- basically a newtype'd string with some extra operations):

struct LocalPath (Path);
struct RemotePath (Path);

which in turn is special syntax Rust has for something like:

struct LocalPath { localpath: Path }

In any case, I implemented this because a lot of package names have dashes (hyphens) in them, but a Rust identifier can't contain a hyphen. Before #8176, because of extern mod directives, a package name had to be a legal Rust identifier. I implemented a hack in rustpkg that turns '-'s into '_'s, but, so it can still find the original directory on disk, keeps the original name with '-'s around as the RemotePath. Now that extern mods can have a path attached, though, I can just get rid of this special case. Hurrah!

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