Skip to content

Conversation

da2ce7
Copy link
Contributor

@da2ce7 da2ce7 commented Oct 17, 2022

No description provided.

@da2ce7
Copy link
Contributor Author

da2ce7 commented Oct 17, 2022

ACK 5e2bef3

@josecelano
Copy link
Member

hi @da2ce7 how are you formatting the code?

It seems the format check in the test_build_release workflow does work.

I'm using VSCode, which I suppose runs something like:

cargo clippy --no-deps

And you can fix with:

cargo clippy --no-deps --fix

The code in the PR is not well formatted because I've been using Clippy.

I assumed we were using Clippy because it shows more warnings (not only linting errors). But in practice, we were not forcing any format since the linting check is not working.

If we agree, we should change the workflow, although we have some warnings for Clippy. I would add a new issue for changing the formatter and fixing the warnings.

@da2ce7
Copy link
Contributor Author

da2ce7 commented Oct 18, 2022

@josecelano I think that the issue is because the difference in version of the rust-format command. I've got the nightly version installed; that I think is more strict than the stable version.

@da2ce7 da2ce7 merged commit 4f4959e into torrust:develop Oct 18, 2022
josecelano added a commit that referenced this pull request Oct 18, 2022
@da2ce7 started using the nightly build for rust formatting here:

#99

And the job 'format' in the workflow did not work, showing these
warnings:

```
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
```

So we needed the nightly channel anyway.
josecelano added a commit that referenced this pull request Oct 18, 2022
@da2ce7 started using the nightly build for rust formatting here:

#99

And the job 'format' in the workflow did not work, showing these
warnings:

```
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
```

So we needed the nightly channel anyway.
josecelano added a commit that referenced this pull request Oct 18, 2022
@da2ce7 started using the nightly build for rust formatting here:

#99

And the job 'format' in the workflow did not work, showing these
warnings:

```
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
```

So we needed the nightly channel anyway.
josecelano added a commit that referenced this pull request Oct 18, 2022
@da2ce7 started using the nightly build for rust formatting here:

#99

And the job 'format' in the workflow did not work, showing these
warnings:

```
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
```

So we needed the nightly channel anyway.
josecelano added a commit that referenced this pull request Oct 18, 2022
@da2ce7 started using the nightly build for rust formatting here:

#99

And the job 'format' in the workflow did not work, showing these
warnings:

```
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
```

So we needed the nightly channel anyway.
josecelano added a commit that referenced this pull request Oct 18, 2022
@da2ce7 started using the nightly build for rust formatting here:

#99

And the job 'format' in the workflow did not work, showing these
warnings:

```
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
```

So we needed the nightly channel anyway.
josecelano added a commit that referenced this pull request Oct 18, 2022
@da2ce7 started using the nightly build for rust formatting here:

#99

And the job 'format' in the workflow did not work, showing these
warnings:

```
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
```

So we needed the nightly channel anyway.
da2ce7 added a commit that referenced this pull request Oct 18, 2022
f2eaf95 feat: use nightly toolchain for formatting (Jose Celano)

Pull request description:

  @da2ce7 started using the nightly build for rust formatting in this [PR-99](#99)

  And the job 'format' in the workflow [did not work](https://github.com/torrust/torrust-tracker/actions/runs/3273393423/jobs/5385541084#step:5:9), showing these warnings:

  ```
  Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
  Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
  Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel.
  Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel.
  ```

  So we needed the nightly channel anyway. I've changed the workflow to use it.

ACKs for top commit:
  josecelano:
    ACK f2eaf95
  da2ce7:
    ACK f2eaf95

Tree-SHA512: 4563fa5fc5dceec12a753b798237e0fcebfd10f1854440847bf87572e237bd76c641155c94791fb0aa3ad87987bfc7f492a3efc0f2d45611d8b0c71f1c6a139e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants