Commit Graph

643 Commits (77f407dd5ff6a3585f9b0236450f8429ca94efbd)
 

Author SHA1 Message Date
marisa eac07df96c 2.0.0 5 years ago
bors 8c1376df07 Auto merge of #235 - rust-lang:fmoko-patch-1, r=fmoko
fix(default): Clarify the installation procedure
5 years ago
bors 45d68d9b39 Auto merge of #232 - rust-lang:update-docs, r=fmoko
chore: Update docs for 2.0

Only merge this once we're ready to release 2.0.
5 years ago
marisa c371b853af
fix(default): Clarify the installation procedure 5 years ago
bors bc32a63c69 Auto merge of #234 - jrvidal:no-prompt-on-run, r=fmoko
fix(run): makes `run` never prompt

`watch` and `verify` do prompt the user to actively move to the
next exercise. This change fixes `run` to never prompt. Previously
it was inconsistent between "test" and "compile" exercises.

BREAKING CHANGE: we again change the behavior of the `run` command
5 years ago
Roberto Vidal 4b26546589 fix(run): makes `run` never prompt
`watch` and `verify` do prompt the user to actively move to the
next exercise. This change fixes `run` to never prompt. Previously
it was inconsistent between "test" and "compile" exercises.

BREAKING CHANGE: we again change the behavior of the `run` command
5 years ago
bors bc56788fe6 Auto merge of #233 - jrvidal:rustc-check, r=fmoko
feat(cli): check for rustc before doing anything

Addresses #190. From the backtraces shown there, it seems like we're not able to launch `rustc` (which is odd, given that they probably compiled and installed `rustlings` 🤷‍♀️)
5 years ago
marisa b4d41c1b7a chore: Update docs for 2.0 5 years ago
Roberto Vidal 36a033b87a feat(cli): check for rustc before doing anything
Addresses #190.
5 years ago
bors 9544ba1029 Auto merge of #231 - rust-lang:refactor-hints, r=jrvidal
Refactor hints

Breaking change. This removes hints from the end of files, and puts them into `info.toml`. You can now access hints using:

```
rustlings hint <exerciseName>
```

ALSO this changes the exercise system to index by name for `run` and `hint`, so:

```
rustlings run exercises/if/if1.rs
```

becomes

```
rustlings run if1
```
5 years ago
marisa 1a7bb5a400 Address feedback 5 years ago
marisa 48c35bcfbc fix tests 5 years ago
marisa ec2d4bd3ee
Merge branch 'master' into refactor-hints 5 years ago
marisa ce9fa6ebbf feat(hint): Add test for hint 5 years ago
marisa 9a9007abae chore: Add .editorconfig file 5 years ago
bors 88ec6f6b16 Auto merge of #230 - jrvidal:master, r=fmoko
Changes the execution mode for `watch`, asking for user input

We've [observed](https://hackmd.io/-cK6aPhnTwiCiI7u6k0xug?both) that learners can get confused when they do get everything right, but they _still_ get errors... which come from the next exercise, no the one they just edited.

This PR changes it so they have to confirm they want to move forward by removing the `I AM NOT DONE` comment.

![Screenshot at 2019-11-11 15:13:39](https://user-images.githubusercontent.com/1636604/68593566-0abd3900-0496-11ea-9e9d-6c43b91bf21d.png)

* [ ] The particular string is of course subject to bikeshed.

### Alternatives/doubts
* The coolest solution I could imagine would involve a proc-macro attribute `#![ready(false)]` that they could edit once they're done, but it's a bit complicated to set up.
* For now I've put `I AM NOT DONE` everywhere, I think it's what make more sense.
5 years ago
marisa 795b6e3480 fix(info): Fix trailing newlines for hints 5 years ago
marisa 9bdb0a12e4 feat: Refactor hint system
Hints are now accessible using the CLI subcommand `rustlings hint
<exercise name`.

BREAKING CHANGE: This fundamentally changes the way people interact with exercises.
5 years ago
Roberto Vidal 2cdd61294f feat: improve `watch` execution mode
The `watch` command now requires user action to move to the next
exercise.

BREAKING CHANGE: this changes the behavior of `watch`.
5 years ago
marisa 627cdc07d0 feat: Index exercises by name
BREAKING CHANGE: This changes the way you use `rustlings run` by now
requiring an abridged form of the previous filename, e.g:

`rustlings run exercises/if/if1.rs` becomes
`rustlings run if1`
5 years ago
marisa a47a62172a 1.5.1 5 years ago
marisa f72e5a8f05 fix(structs1): Remove misleading comment 5 years ago
marisa fbe91a67a4 fix(threads): Move Threads behind SLT
Closes #205.
5 years ago
marisa 6dcecb38a4 fix(strings): Move Strings before Structs
Closes #204.
5 years ago
marisa dcfb427b09 fix(errors3): Update hint
Closes #185.
5 years ago
marisa ad03d180c9 fix(if1): Remove `return` reference
This closes #153.
5 years ago
bors 3232a4d60d Auto merge of #228 - WofWca:clear-screen, r=fmoko
improvement(watch): clear screen before each `verify()`

Closes #146
It seems to me that #227 wasn't really fixing the issue.
5 years ago
WofWca 3aff590855 improvement(watch): clear screen before each `verify()`
Closes #146
5 years ago
marisa c8babbad27 1.5.0 5 years ago
bors c6dad28ddc Auto merge of #224 - nyxtom:feat-enums, r=fmoko
feat: Add enums exercises

Creates an exhaustive list of enum exercises. This goes through the basics of different ways to derive enums with mixed data type variants, as well as the use of the all important `match` operator.
5 years ago
bors fea81419cd Auto merge of #227 - workingjubilee:watch-clears-terminal, r=fmoko
watch: clears terminal before entering loop

Fixes #146

If someone is sliding in and out of "watch" mode, it can make it hard
to tell which error messages are still relevant. This patch resolves
that by clearing the terminal entirely before entering watch's loop.

Note that the escape character is chosen for compatibility reasons, because different shells/terminals can change which commands they accept or have installed, betting on what other commands are in use to collect data seems risky, and just expecting them to implement ANSI escape code sequences is more reliable. This seems especially true since Windows is seeking more UNIX compatibility in its terminals going forward, even though it doesn't implement the POSIX standard per se.
5 years ago
Jubilee Young 83be517e77 watch: clears terminal before entering loop
If someone is sliding in and out of "watch" mode, it can make it hard
to tell which error messages are still relevant. This patch resolves
that by clearing the terminal entirely before entering watch's loop.
5 years ago
marisa 79a569422c
fix: Rewrite test1 logic 5 years ago
bors 1e0b12e37e Auto merge of #225 - ssweeny:fix/test1-wording, r=fmoko
chore: Clarify comment in exercises/test1.rs

closes #194

The author of issue #194 suggests that the wording of the comment is at
least ambiguous about the desired results. I believe this change more
clearly describes the expectation of the exercise.
5 years ago
Thomas Holloway dc15032112 feat: Add enums exercises 5 years ago
Scott Sweeny 2821227acf chore: Clarify comment in exercises/test1.rs
closes #194

The author of issue #194 suggests that the wording of the comment is at
least ambiguous about the desired results. I believe this change more
clearly describes the expectation of the exercise.
5 years ago
bors 2191ef7eee Auto merge of #219 - vyaslav:master, r=fmoko
Added exercise for struct update syntax

Added one exercise for struct update syntax `struct2.rs`
5 years ago
marisa 4c2cf6da75
fix(option1): Fix arguments passed to assert! macro (#222)
fix(option1): Fix arguments passed to assert! macro
5 years ago
marisa 0f3d6d871e
chore: Bump version in Cargo.lock (#223)
chore: Bump version in Cargo.lock
5 years ago
Niklas Anderson bd007d4617 chore: Bump version in Cargo.lock 5 years ago
Niklas Anderson ead4f7af9e fix(option1): Fix arguments passed to assert! macro 5 years ago
marisa 4808b5b3ba
Update README to show latest version, for those who copy/paste (#221)
Update README to show latest version, for those who copy/paste
5 years ago
Mark Provan f3da6796b9
Update README to show latest version, for those who copy/paste 5 years ago
marisa cece12e87e docs: Add automatic Windows support to Readme 5 years ago
marisa 68d1727cac chore(ci): Remove GitHub actions for now 5 years ago
bors 8a2e13b20a Auto merge of #220 - gdoenlen:master, r=fmoko
Add windows install script

Adds a powershell install script for windows users that are at least
running powershell 5. It is almost a direct port of install.sh.
This would be used to automatically download the script much like
curl | bash, but with:

`Invoke-WebRequest https://urltoscript.com | Select-Object
-ExpandProperty Content | Out-File $env:TMP/install_rustlings.ps1;
Unblock-File $env:TMP/install_rustlings.ps1; Invoke-Expression
$env:TMP/install_rustlings.ps1`
5 years ago
George Doenlen ee311b8e5c remove execution policy check 5 years ago
George Doenlen f0de6c4e92 Add basic windows install script.
Adds a powershell install script for windows users that are at least
running powershell 5. It is almost a direct port of install.sh.
This would be used to automatically download the script much like
curl | bash, but with:

`Invoke-WebRequest https://urltoscript.com | Select-Object
-ExpandProperty Content | Out-File $env:TMP/install_rustlings.ps1;
Unblock-File $env:TMP/install_rustlings.ps1; Invoke-Expression
$env:TMP/install_rustlings.ps1`
5 years ago
Viacheslav Avramenko 1c4c8764ed feat: Added exercise for struct update syntax 5 years ago
bors e6161a6f58 Auto merge of #217 - timthelion:timthelion-readme-run, r=fmoko
Tense in README

Don't see why run should be past tense.  At least in my native General American dialect it shouldn't be.
5 years ago