Commit Graph

110 Commits

Author SHA1 Message Date
Christiaan Dirkx
3794fc9ce9 Clean up .gitignore 2021-04-22 11:33:19 +02:00
Camelid
68f50c8025
Ignore Vim swap files 2021-03-10 18:28:05 -08:00
Guillaume Gomez
fa131845bc Ignore nodejs/npm files 2021-02-21 14:21:38 +01:00
Casey Rodarmor
5fc22f1431
Add a tool to run x.py from any subdirectory
This adds a binary called `x` in `src/tools/x`. All it does is check the
current directory and its ancestors for a file called `x.py`, and if it
finds one, runs it.

By installing x, you can easily `x.py` from any subdirectory.

It can be installed globally with `cargo install --path src/tools/x`
2020-11-03 19:40:02 -08:00
Vadim Petrochenkov
10d3f8a484 Move rustllvm into rustc_llvm 2020-09-09 23:05:43 +03:00
Ben Boeckel
1dc722c292 gitignore: allow target to be a symlink
Following rust-lang/cargo#4944.
2020-03-25 17:30:40 -04:00
Mark Rousskov
064f8885d5 Add unicode table generator 2020-01-14 19:11:15 -05:00
Josh Triplett
00e7ff44ca .gitignore: Don't ignore a file that exists in the repository
.gitignore should not ignore files that exist in the repository. The
ignore of .cargo applies to the committed .cargo directory used in an
example:

$ git ls-files --exclude-standard --ignored
src/test/run-make/thumb-none-qemu/example/.cargo/config

Explicitly un-ignore that file.
2019-12-15 23:17:06 -08:00
Ralf Jung
ebc9a1ab10 expand comment 2019-10-21 18:05:48 +02:00
Ralf Jung
55b787e675 keep the root dir clean from debugging 2019-10-21 10:30:35 +02:00
Dylan MacKenzie
efcae577bf Ignore DOT files in .gitignore 2019-10-20 11:03:13 -07:00
Mazdak Farrokhzad
83b837a7f9
.gitignore: Explain why /obj/ is ignored 2019-08-10 10:39:40 +02:00
Mazdak Farrokhzad
87a8c5706d
Explain why /tmp/ is ignored 2019-08-10 10:01:03 +02:00
Mazdak Farrokhzad
352c6d036f
.gitignore: Readd /tmp/
It is produced during `./x.py test`
2019-08-10 08:47:22 +02:00
Ralf Jung
798767ca21 more alphabetical 2019-08-08 19:43:44 +02:00
Ralf Jung
4bde056ed2 tweak ignores 2019-08-08 19:42:46 +02:00
Ralf Jung
fcb186d0fe
fix typo in .gitignore
Co-Authored-By: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
2019-08-08 11:19:44 +02:00
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