Skip to content

Make the version number appear only once in the codebase #5642

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

Closed
brson opened this issue Mar 31, 2013 · 11 comments
Closed

Make the version number appear only once in the codebase #5642

brson opened this issue Mar 31, 2013 · 11 comments
Labels
A-syntaxext Area: Syntax extensions

Comments

@brson
Copy link
Contributor

brson commented Mar 31, 2013

The string "0.6" appears 35 times in our tree and we don't have an obvious way to eliminate this duplication. Something like include_lit! might do the job.

@catamorphism
Copy link
Contributor

Nominating for milestone 5, production-ready

@emberian
Copy link
Member

This is no longer an issue, it seems, as the version number isn't anywhere and we have an include_str and include_bin. Closing.

@huonw
Copy link
Member

huonw commented Jul 25, 2013

This doesn't seem to be completely solved.

> git grep '0.8-pre'
Makefile.in:142:CFG_RELEASE = 0.8-pre
doc/po/rust.md.pot:9:"Project-Id-Version: Rust 0.8-pre\n"
doc/po/rustpkg.md.pot:9:"Project-Id-Version: Rust 0.8-pre\n"
doc/po/tutorial-borrowed-ptr.md.pot:9:"Project-Id-Version: Rust 0.8-pre\n"
doc/po/tutorial-container.md.pot:9:"Project-Id-Version: Rust 0.8-pre\n"
doc/po/tutorial-ffi.md.pot:9:"Project-Id-Version: Rust 0.8-pre\n"
doc/po/tutorial-macros.md.pot:9:"Project-Id-Version: Rust 0.8-pre\n"
doc/po/tutorial-tasks.md.pot:9:"Project-Id-Version: Rust 0.8-pre\n"
doc/po/tutorial.md.pot:9:"Project-Id-Version: Rust 0.8-pre\n"
src/etc/kate/rust.xml:10:<language name="Rust" version="0.8-pre" kateversion="2.4" section="Sources" extensions="*.rs$
src/libextra/extra.rs:24:       vers = "0.8-pre",
src/librust/rust.rs:16:       vers = "0.8-pre",
src/librustc/front/std_inject.rs:21:static STD_VERSION: &'static str = "0.8-pre";
src/librustc/front/test.rs:284:        let mi = attr::mk_name_value_item_str(@"vers", @"0.8-pre");
src/librustc/rustc.rs:12:       vers = "0.8-pre",
src/librustdoc/rustdoc.rs:14:       vers = "0.8-pre",
src/librusti/rusti.rs:62:       vers = "0.8-pre",
src/librustpkg/rustpkg.rs:14:       vers = "0.8-pre",
src/libstd/std.rs:52:       vers = "0.8-pre",
src/libsyntax/syntax.rs:17:       vers = "0.8-pre",
src/test/run-pass/use.rs:16:extern mod bar(name = "std", vers = "0.8-pre");

@huonw huonw reopened this Jul 25, 2013
@z0w0
Copy link
Contributor

z0w0 commented Jul 25, 2013

With the issue of course being that you can't have an include_str! macro within the attribute tags.

@graydon
Copy link
Contributor

graydon commented Aug 15, 2013

just a bug, removing milestone/nomination.

@graydon
Copy link
Contributor

graydon commented Aug 15, 2013

Note: when we have rustpkg building rustc, the number of occurrences will drop.

@metajack
Copy link
Contributor

Bug triage.

Now that we have crate_id, rustpkg is not going to solve this problem either.

@steveklabnik
Copy link
Member

Is this still an issue?

@alexcrichton
Copy link
Member

It is indeed, our version is sprayed everywhere throughout the crate_id attributes and such.

@steveklabnik
Copy link
Member

$ git grep "1\.0\.0"
RELEASES.md:Version 1.0.0-alpha (January 2015)
mk/main.mk:CFG_RELEASE_NUM=1.0.0
src/doc/trpl/installing-rust.md:rustc 1.0.0-nightly (f11f3e7ba 2015-01-04 20:02:14 +0000)
src/etc/kate/rust.xml:<language name="Rust" version="1.0.0" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/x-rust" priority="15">
$

Was this solved by CFG_RELEASE_NUM? /cc @brson

@steveklabnik
Copy link
Member

I believe that it is, closing until I hear otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions
Projects
None yet
Development

No branches or pull requests

9 participants