Commit Graph

93 Commits

Author SHA1 Message Date
Ralf Jung
9cea446c6c Cargo.toml is at the root these days 2019-08-08 11:19:09 +02:00
Ralf Jung
58c231dce7 gitignore: remove some things that look ancient 2019-08-08 09:11:32 +02:00
Ralf Jung
b9978e9220 explain what we want and what not in .gitignore 2019-08-08 08:49:58 +02:00
Ralf Jung
7c374cf7d2 don't ignore mir_dump folder 2019-08-05 22:30:13 +02:00
Mazdak Farrokhzad
327c54ed02
Rollup merge of #60081 - pawroman:cleanup_unicode_script, r=varkor
Refactor unicode.py script

Hi, I noticed that the `unicode.py` script used some deprecated escapes in regular expressions. E.g. `\d`, `\w`, `\.` will be illegal in the future without "raw strings". This is now fixed. I have also cleaned up the script quite a bit.

## Escape deprecation

OK (note the `r`):
`re.compile(r"\d")`

Deprecated (from Python 3.6 onwards, see [here][link1] and [here][link2]):
`re.compile("\d")`.

[link1]: https://docs.python.org/3.6/whatsnew/3.6.html#deprecated-python-behavior
[link2]: https://bugs.python.org/issue27364

This was evident running the script using Python 3.7 like so:

```
$ python3 -Wall unicode.py
unicode.py:227: DeprecationWarning: invalid escape sequence \w
  re1 = re.compile("^ *([0-9A-F]+) *; *(\w+)")
unicode.py:228: DeprecationWarning: invalid escape sequence \.
  re2 = re.compile("^ *([0-9A-F]+)\.\.([0-9A-F]+) *; *(\w+)")
unicode.py:453: DeprecationWarning: invalid escape sequence \d
  pattern = "for Version (\d+)\.(\d+)\.(\d+) of the Unicode"
```

The documentation states that
> A backslash-character pair that is not a valid escape sequence now generates a DeprecationWarning. Although this will eventually become a SyntaxError, that will not be for several Python releases.

## Testing

To test my changes, I had to add support for choosing the Unicode version to use. The script will default to latest release (which is 12.0.0 at the moment, repo has 11.0.0 checked in).

The script generates the exact same output for version 11.0.0 with Python 2.7 and 3.7 and no longer generates any deprecation warnings:

```
$ python3 -Wall unicode.py -v 11.0.0
Using Unicode version: 11.0.0
Regenerated tables.rs.
$ git diff tables.rs
$ python2 -Wall unicode.py -v 11.0.0
Using Unicode version: 11.0.0
Regenerated tables.rs.
$ git diff tables.rs
$ python2 --version
Python 2.7.16
$ python3 --version
Python 3.7.3
```

## Extra functionality

Furthermore, the script will check and download the latest Unicode version by default (without the `-v` argument). The `--help` is below:

```
$ ./unicode.py --help
usage: unicode.py [-h] [-v VERSION]

Regenerate Unicode tables (tables.rs).

optional arguments:
  -h, --help            show this help message and exit
  -v VERSION, --version VERSION
                        Unicode version to use (if not specified, defaults to
                        latest available final release).
```

## Cleanups

I have cleaned up the code quite a bit, with Python best practices and code style in mind. I'm happy to provide more details and rationale for all my changes if the reviewers so desire.

One externally visible change is that the Unicode data will now be downloaded into `src/libcore/unicode/downloaded` directory suffixed by Unicode version:

```
$ pwd
.../rust/src/libcore/unicode
$ exa -T downloaded/
downloaded
├── 11.0.0
│  ├── DerivedCoreProperties.txt
│  ├── DerivedNormalizationProps.txt
│  ├── PropList.txt
│  ├── ReadMe.txt
│  ├── Scripts.txt
│  ├── SpecialCasing.txt
│  └── UnicodeData.txt
└── 12.0.0
   ├── DerivedCoreProperties.txt
   ├── DerivedNormalizationProps.txt
   ├── PropList.txt
   ├── ReadMe.txt
   ├── Scripts.txt
   ├── SpecialCasing.txt
   └── UnicodeData.txt
```
2019-07-06 22:14:33 +02:00
Oliver Scherer
d85e866c0d Ignore .vscode even if it is a symlink 2019-05-25 10:07:01 +02:00
Paweł Romanowski
89feb6d5fd Clean up unicode.py script 2019-04-18 15:30:50 +02:00
Oliver Scherer
67ede4cb7f Ignore some IDE-local files 2019-01-08 15:21:06 +01:00
Ralf Jung
6628d39f4a move file-extension based .gitignore down to src/ 2018-08-28 20:04:52 +02:00
David Wood
c645ecd0a6
Added new lines to .gitignore. 2018-07-22 14:14:39 +01:00
varkor
9802300302 Update .gitignore for libstd_unicode 2018-05-21 18:57:54 +01:00
toidiu
6a229cbfac Implement inferring outlives requirements for references, structs, enum, union, and projection types. added a feature gate and tests for these scenarios. 2018-04-12 13:52:06 -04:00
Tamir Duberstein
658ea389fd
rustc_llvm: remove stale references
...that were removed in 77c3bfa742.
2017-11-28 18:15:28 -05:00
bjorn3
cba53f0be5 Allow writing metadata without llvm 2017-09-23 12:54:53 +02:00
Stepan Koltsov
affe6e148c Ignore *.iml files
... which are IntelliJ IDEA module files. (`.idea` is IDEA project files.)
2017-06-30 23:18:47 +03:00
kennytm
57356b36fc
Ignore some folders.
- /src/target -- created when trying to directly `cargo build` on a single
  package.
2017-06-02 01:14:25 +08:00
Steve Klabnik
626cf3a263 include everything in the vendor directory 2017-02-13 13:41:17 -05:00
Simon Sapin
3b208d2dac Reduce the size of static data in std_unicode::tables.
`BoolTrie` works well for sets of code points spread out through
most of Unicode’s range, but is uses a lot of space for sets
with few, mostly low, code points.

This switches a few of its instances to a similar but simpler trie
data structure.

 ## Before

`size_of::<BoolTrie>()` is 1552, which is added to
`table.r3.len() * 8 + t.r5.len() + t.r6.len() * 8`:

* `Cc_table`: 1632
* `White_Space_table`: 1656
* `Pattern_White_Space_table`: 1640
* Total: 4928 bytes

 ## After

`size_of::<SmallBoolTrie>()` is 32, which is added to
`t.r1.len() + t.r2.len() * 8`:

* `Cc_table`: 51
* `White_Space_table`: 273
* `Pattern_White_Space_table`: 193
* Total: 517 bytes

 ## Difference

Every Rust program with `std` statically linked should be about 4 KB smaller.
2017-01-03 08:28:58 +01:00
Alex Crichton
31a8638e5e rustbuild: Tweak for vendored dependencies
A few changes are included here:

* The `winapi` and `url` dependencies were dropped. The source code for these
  projects is pretty weighty, and we're about to vendor them, so let's not
  commit to that intake just yet. If necessary we can vendor them later but for
  now it shouldn't be necessary.

* The `--frozen` flag is now always passed to Cargo, obviating the need for
  tidy's `cargo_lock` check.

* Tidy was updated to not check the vendor directory

Closes #34687
2016-11-08 07:32:05 -08:00
Vadim Chugunov
751d43ade4 Ignore VS Code settings directory 2016-08-05 00:17:20 -07:00
bors
5d12502d3a Auto merge of #33617 - sanmai-NL:gitignore_IntelliJ, r=nikomatsakis
IntelliJ support, ordering, cleanup
2016-05-17 04:02:15 -07:00
Scott Olson
ef53fa76df rustbuild: Ignore user config.toml file. 2016-05-14 01:16:08 -06:00
Sander Maijers
650855322b
IntelliJ support, ordering, cleanup 2016-05-13 19:18:59 +02:00
Alex Crichton
de1838148c Add /obj/ to .gitignore
This is the build directory our buildbots use, and right now the bots are
running `git clean -f -f -d` to remove all untracked files between runs and this
is accidentally deleting `obj`, so we're building LLVM a lot.

Hopefully this keeps the bots caching `obj` so we can clean it out manually and
leave LLVM around.
2016-04-13 17:46:01 -07:00
Robin Kruppe
e4ef60c6c5 Add *.pdb to .gitignore 2016-02-13 20:24:31 +01:00
Alex Crichton
046e6874c4 Add a Cargo-based build system
This commit is the start of a series of commits which start to replace the
makefiles with a Cargo-based build system. The aim is not to remove the
makefiles entirely just yet but rather just replace the portions that invoke the
compiler to do the bootstrap. This commit specifically adds enough support to
perform the bootstrap (and all the cross compilation within) along with
generating documentation.

More commits will follow up in this series to actually wire up the makefiles to
call this build system, so stay tuned!
2016-02-11 10:42:28 -08:00
Cruz Julian Bishop
8e3ea5d501 Ignore KDevelop 4 (and 5 pre-release) project files 2015-06-25 23:26:05 +00:00
Huon Wilson
c41c1edf3b gitignore: Add the autogenerated/downloaded unicode data files. 2014-08-03 17:32:53 +10:00
OGINO Masanori
821262f30e Use globs to ignore target directories.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-08-03 02:14:37 +09:00
OGINO Masanori
5ebda6d39d Sort .gitignore.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-08-03 02:14:37 +09:00
Brian Anderson
d3096c2348 Move llvm bindings to their own crate 2014-07-14 12:27:07 -07:00
Simon Sapin
cf3e8ba6d0 Ignore /build even if it’s a symlink, but only at top-level. 2014-05-30 11:37:31 -07:00
Heather
918e285d60 remove /build from .gitignore since there is build/ 2014-05-28 23:39:14 -07:00
Brian Anderson
60a2aedbbb Add /dist/ to .gitignore 2014-03-09 14:17:27 -07:00
Simon Sapin
3a66548979 Ignore /build even if it’s a symlink. 2014-02-16 12:41:41 +00:00
Adrien Tétar
ec2f047aa9 doc: add license information for gen. files 2014-02-07 20:50:15 +01:00
Alex Crichton
22a421fa02 Rewrite the doc makefile for doc => src/doc
This continues to generate all documentation into doc, but it now looks for
source files in src/doc

Closes #11860
Closes #11970
2014-02-02 10:59:27 -08:00
David Manescu
93398d16ec extra: move glob to libglob
In line with the dissolution of libextra - moves glob to its own library libglob.
Changes based on PR #11787. Updates .gitignore to ignore doc/glob.
2014-01-29 17:23:28 +11:00
David Manescu
4d0d3da9e4 extra: move arena to libarena
In line with the dissolution of libextra - #8784 - moves arena to its own library libarena.
Changes based on PR #11787. Updates .gitignore to ignore doc/arena.
2014-01-29 13:54:38 +11:00
Kevin Ballard
2846ee6ba5 Add /doc/{flate,rustdoc} to .gitignore 2014-01-26 19:44:45 -08:00
Kevin Ballard
110e5dd1ac doc: build the docs for librustpkg 2014-01-11 19:13:59 -08:00
Kevin Ballard
50cf55f136 Add /doc/rustuv to .gitignore 2014-01-11 14:43:58 -08:00
OGINO Masanori
20ec0be779 Remove *.pot files and ignore them now.
The .pot files can be generated automatically and the files contain
timestamps in their content. They can cause huge conflicts and take huge
space even if you are not a translator.

This commit is a part of improvement discussed on
https://github.com/mozilla/rust/pull/11383 .

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-01-10 07:21:32 +09:00
Kevin Ballard
1db746474d Add /doc/{rustc,syntax} to .gitignore 2013-12-29 14:30:34 -05:00
Kevin Ballard
b3ae7b13ec Add /doc/{green,native} to .gitignore 2013-12-29 13:24:48 -05:00
Chris Morgan
a1ca7458f1 Remove many false positives from the ctags results
Anchoring the keyword as the first non-whitespace on a line may mean
that the occasional genuine-but-unconventionally-formatted tag is
missed, but it avoids a large number of false positives.

I changed the type descriptive texts about a bit too. That part's purely
cosmetic.

I also changed the ignored file list to use a filename matching the make
rule, `TAGS.vi` instead of `TAGS.vim`.
2013-12-20 01:59:01 +11:00
Alex Crichton
e91ffb0710 Link rustllvm statically, and distribute a static snapshot
In order to keep up to date with changes to the libraries that `llvm-config`
spits out, the dependencies to the LLVM are a dynamically generated rust file.
This file is now automatically updated whenever LLVM is updated to get kept
up-to-date.

At the same time, this cleans out some old cruft which isn't necessary in the
makefiles in terms of dependencies.

Closes #10745
Closes #10744
2013-12-06 20:51:17 -08:00
Joe Schafer
e91cb479a4 Add Window build directory to .gitignore 2013-11-13 21:05:01 -05:00
Noufal Ibrahim
759c0168a1 Create epub versions of tutorial and ref manual.
Pandoc can create epub verions of the markdown files. Since the docs
are lengthy, epubs are handy to have around. Two rules to create epub
versions of the reference manual and the main tutorial are added here.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
2013-11-03 18:39:36 +05:30
Adrien Tétar
8d97db48d4 doc: tidy and cleanup CSS deps, add tutorial PDF generation 2013-10-21 04:12:12 +02:00