profile
viewpoint

pull request commentrust-lang/rust

Updated RELEASES.md for 1.36.0

@bors r+

XAMPPRocky

comment created time in a day

push eventXAMPPRocky/rust

Erin Power

commit sha 0f34d7a7e5f068683097e0e664249bd6a417032f

Updated RELEASES.md for 1.36.0 Co-Authored-By: Taiki Endo <te316e89@gmail.com> Co-Authored-By: Jonas Schievink <jonasschievink@gmail.com> Co-Authored-By: Torbjørn Birch Moltu <t.b.moltu@lyse.net>

view details

push time in a day

push eventXAMPPRocky/rust

XAMPPRocky

commit sha f808fca8bf60aad09c22837da3e094ca1f805574

Update RELEASES.md

view details

push time in a day

push eventXAMPPRocky/rust

XAMPPRocky

commit sha cddd390463ff83cd0928694009bb92e60893e6bd

Update RELEASES.md

view details

push time in a day

issue commentrust-lang/cargo

Change Cargo include/exclude rules to gitignore patterns

Is there anything left to be implemented or can this issue be closed? Probably at very least there needs to be a PR to update the manifest documentation.

behnam

comment created time in a day

push eventXAMPPRocky/tokei

Korny Sietsma

commit sha afcaf0418fc75e28eeea16fea8211373712a56f7

Added config so "/usr/bin/env ruby" works (#344)

view details

push time in 2 days

PR merged XAMPPRocky/tokei

Added config so "/usr/bin/env ruby" works

including a very simple test fixes #343

+14 -0

1 comment

2 changed files

kornysietsma

pr closed time in 2 days

issue closedXAMPPRocky/tokei

Support ruby scripts with /usr/bin/env shebang

It'd be useful for ruby projects to support /usr/bin/env ruby as a shebang line on ruby scripts - for example https://github.com/alphagov/verify-frontend/blob/master/bin/setup

(PR incoming)

closed time in 2 days

kornysietsma

pull request commentXAMPPRocky/tokei

Added config so "/usr/bin/env ruby" works

Thank you for your PR!

kornysietsma

comment created time in 2 days

push eventXAMPPRocky/rust

XAMPPRocky

commit sha b69247e08744dc1d3330f3196631cbb2d1cf1839

Update RELEASES.md Co-Authored-By: Torbjørn Birch Moltu <t.b.moltu@lyse.net>

view details

push time in 2 days

push eventXAMPPRocky/rust

XAMPPRocky

commit sha 493bf0cc6683de782508c47d6051425faf5344ab

Update RELEASES.md

view details

push time in 2 days

push eventXAMPPRocky/tokei

Samuel Cormier-Iijima

commit sha 354948df02ffa2637b4141bac9de7c54f2d6cb51

Add .cjsx as a CoffeeScript extension (#342) See https://coffeescript.org/#jsx

view details

push time in 2 days

PR merged XAMPPRocky/tokei

Add .cjsx as a CoffeeScript extension

See https://coffeescript.org/#jsx for details.

+2 -1

1 comment

1 changed file

sciyoshi

pr closed time in 2 days

pull request commentXAMPPRocky/tokei

Add .cjsx as a CoffeeScript extension

Thank you for your PR, and congrats on your first contribution! 🎉

sciyoshi

comment created time in 2 days

push eventXAMPPRocky/tokei

Daniel Duan

commit sha 4951c5dec895ee939ca972aaee857360600cafeb

Fix spelling for Xcode and Objective-C(++) (#340)

view details

push time in 3 days

PR merged XAMPPRocky/tokei

Fix spelling for Xcode and Objective-C(++)

The "c" in Xcode should be lowercase. There's a dash in Objective-C and Objective-C++.

+17 -17

1 comment

4 changed files

dduan

pr closed time in 3 days

pull request commentXAMPPRocky/tokei

Fix spelling for Xcode and Objective-C(++)

Thank you for your PR, and congrats on your first contribution to tokei! 🎉

dduan

comment created time in 3 days

push eventXAMPPRocky/rust

XAMPPRocky

commit sha e398dc1698526b53ecec5914fe687983e6f30975

Update RELEASES.md Co-Authored-By: Jonas Schievink <jonasschievink@gmail.com>

view details

push time in 4 days

push eventXAMPPRocky/rust

XAMPPRocky

commit sha a0e92efc4fe83e355794c13068a40c14f1186b5d

Update RELEASES.md Co-Authored-By: Taiki Endo <te316e89@gmail.com>

view details

push time in 4 days

PR opened rust-lang/rust

Updated RELEASES.md for 1.36.0 C-enhancement T-release

Rendered

r? @Mark-Simulacrum

cc @rust-lang/release

+99 -1

0 comment

1 changed file

pr created time in 4 days

push eventXAMPPRocky/rust

varkor

commit sha c3febc0884d3ca65416562fa5bf440d09772af10

Make "panic did not include expected string" message consistent Note messages are typically lowercase.

view details

Chris Gregory

commit sha 333e1ca319636d23983de1f8ea2c102aae731c54

Add Bound::cloned()

view details

Mazdak Farrokhzad

commit sha 2ebfbb4fabda543f090890a889914df025ccbb77

Parse 'async unsafe fn' instead of 'unsafe async fn'.

view details

OptimisticPeach

commit sha fc21f33d4db9e2f0317c277851c05954e476d1ac

Fixed some typos.

view details

varkor

commit sha f2210a9971693e7724432379b7f38191c058ddb0

Update LLVM

view details

varkor

commit sha eb0afe1845c970f6dd16bc53fa7f3464ee76daff

Add more information in ConstEvalFailure error

view details

varkor

commit sha 7e92607f5a622e6fd9b32492a70217762cb709c4

Fix unwrapping usize issue in HasMutInterior

view details

Esteban Küber

commit sha b3ac88ad922a618e6bf0eb269084d60233a311e4

Recover gracefully from argument with missing type or param name

view details

Esteban Küber

commit sha 1ee45da2b9789881b8c79d6a1af8a2c9fd5364f2

Remove `ArgSource::Recovery`

view details

Esteban Küber

commit sha ad0d3b5d4064cfd9013c498299a53b3f1586553e

Move code from `parser` to `diagnostics`

view details

Esteban Küber

commit sha 860dce794ce1856418bec278a13565b84d0d4d79

Remove unecessary `-Z continue-parse-after-error` from tests

view details

Chris Gregory

commit sha 867c4a5fdac44d683035d8eaaf69f43adffcc5ca

Fix compilation errors

view details

Lzu Tao

commit sha 1c26bbf6283baefa7d6f598d693c57bcec4c3450

Stabilize reverse_bits feature

view details

Yuki Okushi

commit sha 8f34a50cc5bb94f7d3381ec00ed273af68724a4b

Remove ty::BrFresh and new_bound

view details

John Kåre Alsaker

commit sha 6d387463aa074982c8c6427a708cd9a18a6f58dc

Remove GlobalArenas and use Arena instead

view details

John Kåre Alsaker

commit sha 66a376ea4f8caf9049c90888c1c1caa9a109b02c

Store CtxtInterners for local values in AllArenas

view details

Wesley Wiser

commit sha 3b7223deaff5f1f71258de07f5aef18bd9bba702

Doc comment fixes for `rustc::mir::interpret::InterpretCx`

view details

bors

commit sha db4c783319d60ba2e4c93ac0b6a295f345a9c544

Auto merge of #60166 - oli-obk:type_name, r=eddyb Make the `type_name` intrinsic deterministic cc @eddyb for the printing infrastructure cc @Centril for the deterministic (coherent?) output r? @sfackler

view details

Pietro Albini

commit sha eebe62aaa1e31151269d19ec71248215a40f6417

Rollup merge of #60897 - seanmonstar:patch-4, r=sfackler error: remove StringError from Debug output Seeing `StringError("something something")` in debug output can cause someone to think there was an error dealing with `String`s, not that the error type is just a string. So, remove that noise. For example: ``` io error: Custom { kind: InvalidData, error: StringError("corrupt data") } ``` With this change: ``` io error: Custom { kind: InvalidData, error: "corrupt data" } ```

view details

Pietro Albini

commit sha 90d4ef3af2c5b94ab23faaedda068433c4aba2ef

Rollup merge of #61304 - lzybkr:iwr_progress, r=alexcrichton Speed up Azure CI installing Windows dependencies There is known issue where PowerShell is unreasonably slow downloading files due to an issue with rendering the progress bar, see this [issue](https://github.com/PowerShell/PowerShell/issues/2138) That issue is fixed in PowerShell Core (available in Azure Pipelines as pwsh.exe) but it can also be worked around by setting: $ProgressPreference = 'SilentlyContinue' I measured downloading LLVM and it took about 220s before, 5s after, so the improvement is significant.

view details

push time in 4 days

issue closedXAMPPRocky/tokei

Error log level is a bit high.

As soon as I've added env_logger::init() to my crate I started getting:

[2019-06-21T23:43:10Z ERROR tokei::utils::fs] stream did not contain valid UTF-8 reading /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/encoding_rs-0.8.17/src/test_data/gb18030_out_ref.txt
[2019-06-21T23:43:10Z ERROR tokei::utils::fs] stream did not contain valid UTF-8 reading /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/encoding_rs-0.8.17/src/test_data/jis0208_in.txt  
[2019-06-21T23:43:10Z ERROR tokei::utils::fs] stream did not contain valid UTF-8 reading /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/encodin
g_rs-0.8.17/src/test_data/euc_kr_out_ref.txt                                                                                                             
[2019-06-21T23:43:10Z ERROR tokei::utils::fs] stream did not contain valid UTF-8 reading /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/encodin
g_rs-0.8.17/src/test_data/jis0208_out_ref.txt                                                                                                            
[2019-06-21T23:43:10Z ERROR tokei::utils::fs] stream did not contain valid UTF-8 reading /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/encodin
g_rs-0.8.17/src/test_data/jis0212_in.txt                                                                                                                 
[2019-06-21T23:43:10Z ERROR tokei::utils::fs] stream did not contain valid UTF-8 reading /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/encodin
g_rs-0.8.17/src/test_data/shift_jis_in.txt                                                                                                               
[2019-06-21T23:43:10Z ERROR tokei::utils::fs] stream did not contain valid UTF-8 reading /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/encodin
g_rs-0.8.17/src/test_data/shift_jis_out_ref.txt                                                                                                          
[2019-06-21T23:43:10Z ERROR tokei::utils::fs] stream did not contain valid UTF-8 reading /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/encodin
g_rs-0.8.17/src/test_data/gb18030_in.txt                                                                                                                 
[2019-06-21T23:43:10Z ERROR tokei::utils::fs] stream did not contain valid UTF-8 reading /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/encodin
g_rs-0.8.17/src/test_data/euc_kr_in.txt                                                                                                                  
[2019-06-21T23:43:10Z ERROR tokei::utils::fs] stream did not contain valid UTF-8 reading /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/encodin
g_rs-0.8.17/src/test_data/big5_in.txt                                                                                                                    
[2019-06-21T23:43:10Z ERROR tokei::utils::fs] stream did not contain valid UTF-8 reading /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/encodin
g_rs-0.8.17/src/test_data/big5_out_ref.txt   

which is not great, because I don't care (not trying to be mean: just the user of my app does not care about internal errors). The thing is - log levels are global, so the fact that tokei as a library had some internal error somewhere is not really an error for the whole application using it. It should probably be debug level.

closed time in 4 days

dpc

issue commentXAMPPRocky/tokei

Error log level is a bit high.

@dpc ank you for your issue! In the latest version of tokei you should no longer receive that particular error so this shouldn't be as much of an issue. I have no current plans to change any of the other error level logs.

dpc

comment created time in 4 days

push eventdac-gmbh/asn1

Erin Power

commit sha 9f847863ddfcb0855f34e44a2b1a0867ec88ed14

Added more tests for fixed size arrays and better is_constructed support

view details

push time in 5 days

push eventdac-gmbh/asn1

Erin Power

commit sha d3c0e66d36a1648a81b9dae70eeb87ff7097b9e1

Replaced dbg macro with debug log

view details

push time in 5 days

push eventdac-gmbh/asn1

Erin Power

commit sha e794f21eb150bcb8450be0f447d3511d95e50528

Renamed into_inner to into_vec

view details

push time in 5 days

push eventdac-gmbh/asn1

Erin Power

commit sha c599b633a95796990d705016d489b66a7c310397

Added String support and moved RawSerializer to own module

view details

push time in 6 days

push eventdac-gmbh/asn1

Erin Power

commit sha fc03382c5e9376654a584ff6e5e2f8d8c468058d

Improved the encoder to be more stateful, and fixed decoding errors

view details

push time in 6 days

pull request commentXAMPPRocky/remove_dir_all

chore: Include README.md

@ignatenkobrain Thank you for your PR!

ignatenkobrain

comment created time in 6 days

push eventXAMPPRocky/remove_dir_all

Igor Gnatenko

commit sha e2747c6b76d49e17175c7b716ef6cbea61e13f2a

chore: Include README.md (#14) Otherwise doctests fail.

view details

push time in 6 days

PR merged XAMPPRocky/remove_dir_all

chore: Include README.md

Otherwise doctests fail.

+2 -1

0 comment

1 changed file

ignatenkobrain

pr closed time in 6 days

push eventdac-gmbh/asn1

Erin Power

commit sha a014b09f79459108eeef0589970f95db8bad11c9

Changed nom error type

view details

push time in 8 days

push eventdac-gmbh/asn1

Erin Power

commit sha b5c93f31853ae6c2bab44e0ad7b94e9202424e8d

Improved error handling

view details

push time in 8 days

push eventdac-gmbh/asn1

Erin Power

commit sha c9dd9e3b5822fd3aa48a26d6393582727b204674

Implemented OctetString support

view details

push time in 8 days

push eventdac-gmbh/asn1

Erin Power

commit sha f1fb01538550314bf8f2f7ec57fd09b18dfe4606

Added sequence to any deserialisation

view details

push time in 8 days

push eventdac-gmbh/asn1

Erin Power

commit sha 75ed63ee83a252a917c8133ebec12c0ff67ee1ca

Added TupleVariant and StructVariant serialisation support

view details

push time in 8 days

push eventdac-gmbh/asn1

Erin Power

commit sha ac3e56f8f3aa4aad2c3feb73b926e6b89018c14e

Implemented minimal working serde serializer & deserializer

view details

push time in 8 days

push eventXAMPPRocky/tokei

XAMPPRocky

commit sha 9051498c792fe45444344619a6531bcb45e409b6

Update README.md

view details

push time in 9 days

issue commentrust-lang/rust-clippy

Clippy release process: Including our changelog in the upstream release announcement

If the clippy team was okay with it, we could merge or copy Clippy's CHANGELOG to be another section in the Rust RELEASES.md? It would not add any significant time to my work. I already wrote a tool for the generating the release notes and could add clippy to it.

The relnotes tool I wrote does something similar to what is being suggested. It first finds the start and end date of the six weeks between the last release and the release before it (aka what's in beta). It uses these dates to get every PR merged to a repo (In this case rust-lang/rust & rust-lang/cargo) in that time. It then compiles these PRs into a Markdown document with a list of the titles of each PR with a respective link, seperated by category (lang, compiler, etc.). It does this using GitHub's labels (e.g. T-compiler -> compiler related PR). We also use the relnotes label to mark that the writer of the release notes should always include this PR in the draft to be submitted.

Manishearth

comment created time in 12 days

push event1aim/asn1

Erin Power

commit sha 13b33971c6a15f378f366549485ba90839faccaf

Working serde deserializer for integers, bools, and structs

view details

push time in 13 days

issue closedXAMPPRocky/remove_dir_all

publish new version of crate on crates.io for fix in #12

Now that #12 has landed, it'd be useful to publish a new version of the crate with that fix on crates.io, so projects that depend on the crates.io distribution can simply update their dependency version to get the fix (instead of having to change their dependency to reference the repository and commit).

closed time in 13 days

mykmelez

issue commentXAMPPRocky/remove_dir_all

publish new version of crate on crates.io for fix in #12

Thank you for your issue! I have just released 0.5.2.

mykmelez

comment created time in 13 days

push eventXAMPPRocky/remove_dir_all

Erin Power

commit sha 07f98f0fffe3d2dd540f89716ae9803360583198

Version 0.5.2

view details

push time in 13 days

issue closedXAMPPRocky/tokei

failed to install tokei v10.0.0

failed to install tokei via cargo on alpine image. cargo install tokei

FROM python:3.7.3-alpine3.9
...
RUN apk add git bash curl pkgconfig libffi-dev musl-dev make gcc libgit2 libgit2-dev cargo
RUN cargo install tokei
error[E0658]: use of unstable library feature 'range_contains': recently added as per RFC (see issue #32311)
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokei-10.0.0/src/utils/ext.rs:9:46
  |
9 |         *self == b' ' || (b'\x09'..=b'\x0d').contains(self)
  |                                              ^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: failed to compile `tokei v10.0.0`, intermediate artifacts can be found at `/tmp/cargo-install2HnZfj`

Caused by:
  Could not compile `tokei`.

closed time in 15 days

mrsiano

issue commentXAMPPRocky/tokei

failed to install tokei v10.0.0

@mrsiano Thank you for your issue! This is because tokei is using a feature only available in the latest stable compiler. I don't know how alpine's apk works, but you want to make sure you're installing rust 1.35.0.

mrsiano

comment created time in 15 days

push eventXAMPPRocky/tokei

Jonas Schievink

commit sha ea4d7f12a6507e06d412b70f4ca1d9754e2a0681

Fix formatting of the added language list (#337)

view details

push time in 16 days

push eventXAMPPRocky/remove_dir_all

Myk Melez

commit sha 5e3f71bd30da66d64ed0c81278de0648c3d7d87b

support aarch64-pc-windows-msvc (#12)

view details

push time in 16 days

PR merged XAMPPRocky/remove_dir_all

support aarch64-pc-windows-msvc (fixes #10)

This fixes the issue in #10 by selecting a STRUCT_SIZE const definition based on cfg(target_pointer_width) rather than cfg(target_arch), which is similar to what @froydnj did in for winapi-rs in https://github.com/retep998/winapi-rs/pull/677.

It also adds building (but not testing) of aarch64-pc-windows-msvc to the appveyor.yml configuration. I don't know how to test that target on Appveyor, but we can at least confirm that it builds.

(I'm also testing this fix in Firefox, which failed without the fix in this CI run and looks like it'll succeed with the fix in this one.)

As @jdm notes in #10, it might be possible to use mem::size_of() here, although I don't know enough about this code or that method to feel confident about using it here. In my testing, mem::size_of::<FILE_RENAME_INFO>() is 24 on my 64-bit system, while the sum of the sizes of the first three fields of that struct (which is what STRUCT_SIZE represents, if I understand the code correctly) is 16; neither of which is the current hardcoded value of STRUCT_SIZE for 64-bit builds (20).

The last fix in this branch is to the example in the comment at the top of fs.rs, which was failing docs tests for me because the "temp" directory that it attempts to remove doesn't exist. I fixed docs tests by adding an fs::create_dir() call to create that directory before calling remove_dir_all() to remove it.

+31 -9

1 comment

2 changed files

mykmelez

pr closed time in 16 days

pull request commentXAMPPRocky/remove_dir_all

support aarch64-pc-windows-msvc (fixes #10)

Thank you for your PR! Congrats on your first contribution! 🎉

mykmelez

comment created time in 16 days

created tagXAMPPRocky/tokei

tagv10.0.0

A program that allows you to count your code, quickly.

created time in 16 days

push eventXAMPPRocky/tokei

Erin Power

commit sha 3d686401a333f86428645501e3fa3ee0e2a36ad6

Updated documentation

view details

Erin Power

commit sha 71e093918aae63e084acbfed9b188d8606a91a0f

Version 10

view details

push time in 16 days

push eventXAMPPRocky/tokei

Josh Stone

commit sha 64b493684c9082d9b00e4de154938549edc2be6e

Bump git2 to 0.9 (#336)

view details

push time in 18 days

PR merged XAMPPRocky/tokei

Bump git2 to 0.9
+7 -7

1 comment

2 changed files

cuviper

pr closed time in 18 days

pull request commentXAMPPRocky/tokei

Bump git2 to 0.9

Thank you for your PR! Congrats on your first contribution! 🎉

cuviper

comment created time in 18 days

issue closedXAMPPRocky/tokei

[Idea] Strip comments ?

It would be handy if there were some way to use the language parsing logic to strip comments from source code - similar to cloc's --strip-comments command.

I'm writing some tools that process source code in language-agnostic ways - things like measuring indentation stats and similar - and I'd love to be able to use the parsers here to ignore comments before I do any processing. But at the moment it looks like I'd have to duplicate most of LanguageType::parse_lines to do this.

closed time in 19 days

kornysietsma

issue commentXAMPPRocky/tokei

[Idea] Strip comments ?

Thank you for your issue! I don't think this kind of functionality should be in tokei itself, not least because the way tokei is currently designed, no file contents are stored after processing. So tokei would have to first change this before it could provide a way to strip comments. I think this would be better as a library so that it could be used for different tools.

kornysietsma

comment created time in 19 days

push event1aim/asn1

Erin Power

commit sha 32ab41f1297a9a803277cc93c284e0840af4440d

Added CHOICE support

view details

push time in 21 days

push event1aim/asn1

Erin Power

commit sha b14c3003ac1266f64f5b6d253eac48c6b37a83b7

Implemented sequence encoding (decoding still WIP)

view details

Erin Power

commit sha 661ef30a83cffe19b6e8ef1b74fde9890656124d

Refactored the generation code in the derive

view details

Erin Power

commit sha b77c5d4ba306a931021b3d3c7faef2a84716601c

cargo fmt

view details

push time in 21 days

push event1aim/asn1

Erin Power

commit sha f3b913eba13297b859582f257736992cd2bbc4a7

WIP: working sequence encoding and decoding implementation.

view details

push time in 24 days

issue closedXAMPPRocky/tokei

UTF error with pre-built v9.0

Using the prebuilt tokei CLI v9.0 tokei-v9.0.0-x86_64-unknown-linux-gnu.tar.gz on Ubuntu 16.04 LTS on x86_64, I am getting this error when counting some code.

[2019-02-11T08:23:29Z ERROR tokei::utils::fs] stream did not contain valid UTF-8 reading test/gobject.rc.in

The attached utf-test.zip contains the files that triggered this.

All these are test files from https://github.com/nexB/scancode-toolkit (I am considering bundling tokei in ScanCode). The common theme is that they contain non-ASCII chars. Also some contain broken comments (e.g. a C /* without a closing */

All were eventually collected from code that's actually used and existing: I could not expect a failure based on file encoding as in some cases you cannot determine what the original is and certainly will get other things than UTF-8.

closed time in 25 days

pombredanne

issue commentXAMPPRocky/tokei

UTF error with pre-built v9.0

Thank you for the issue! I have fixed this error in the master branch and it will be available in the next release.

pombredanne

comment created time in 25 days

issue closedXAMPPRocky/tokei

Dockerfile comments are not counted correctly

See attached file Dockerfile.zip. I'm using Tokei 9.1.1 on Debian 9.7. The output is:

-------------------------------------------------------------------------------
 Language            Files        Lines         Code     Comments       Blanks
-------------------------------------------------------------------------------
 Dockerfile              1           60           44            3           13
-------------------------------------------------------------------------------
 Total                   1           60           44            3           13
-------------------------------------------------------------------------------

When actually there are 9 comment lines.

closed time in 25 days

ptupitsyn

issue commentXAMPPRocky/tokei

Dockerfile comments are not counted correctly

I have fixed this error in the master branch and it will be available in the next release.

ptupitsyn

comment created time in 25 days

push eventXAMPPRocky/tokei

Erin Power

commit sha b70450171d19dd67085ee872c0d852e8b8da7816

Fixed parsing bug

view details

push time in 25 days

issue closedXAMPPRocky/tokei

Ugly and unusable error message when permission denied for a file/directory

The error message of tokei is ugly, when it isn't permitted to read a directory/file. directory:

ERROR:tokei::utils::fs: permission denied

file:

ERROR:tokei::language::languages: permission denied

The error message looks like it is meant for the developer, and it is not too much usable for the user. It doesn't contain a filename, instead it contains unnecessary information about how the file/directory reading is internally implemented.

Expected behaviour:

  • directory: Permission denied for reading /path/to/dir
  • file: similar to the directory error message, but if the extension is known, mark the language in the final result:
    Permission denied for reading /path/to/file.rs
    Permission denied for reading file.cr
    Note: results can be inaccurate for languages marked with '(!)'
    -------------------------------------------------------------------------------
     Language            Files        Lines         Code     Comments       Blanks
    -------------------------------------------------------------------------------
     Crystal (!)            14         1144          945           54          145
     YAML                    2          121           77           25           19
     Nim                     2          193          136           23           34
     Rust (!)               16         2102         1405          456          241
     D                       1            8            5            1            2
    

closed time in 25 days

notramo

issue closedXAMPPRocky/tokei

Get lines of code by folder

Is there a way we can lines of code folder level using tokei? example:

I have a repository which has five folders, is there a way I can pass a flag which can give lines of code per folders ?

  1. folder1 --> 100
  2. folder2 --> 50

closed time in 25 days

pankajmalhotra

pull request commentXAMPPRocky/tokei

Access files to analyze through FileAccess trait

I meant providing tar functionality in tokei itself.

udoprog

comment created time in 25 days

pull request commentXAMPPRocky/tokei

Access files to analyze through FileAccess trait

@udoprog I would support unpacking tar files if the implementation was reasonable. I'd prefer to see this abstraction applied to a feature (such as tar archives) and see how that would impact the codebase before I would feel comfortable merging it in.

udoprog

comment created time in 25 days

push eventXAMPPRocky/tokei

Erin Power

commit sha 49a7e2df760a208b3e82e52475f8d86986955728

Remove whitespace

view details

Erin Power

commit sha 3e7e9f24a9ca324021bc4ebd387dae1ae01055d6

Updated import styling

view details

push time in 25 days

push eventXAMPPRocky/tokei

amesgen

commit sha abd244d511cc6a8885baf92ed262559de06707fb

add .tpp extension to C++ (#321)

view details

push time in 25 days

PR merged XAMPPRocky/tokei

add .tpp extension to C++

.tpp is frequently used for C++ header files which actually contain implementation details (e.g. due to templates or inlining).

Thanks for this useful tool!

+2 -1

1 comment

1 changed file

amesgen

pr closed time in 25 days

pull request commentXAMPPRocky/tokei

add .tpp extension to C++

Thank you for your PR! Sorry for the late reply. Congrats on your first contribution! 🎉

amesgen

comment created time in 25 days

Pull request review commentXAMPPRocky/tokei

Use box drawing characters if the charset is set to UTF8

 pub fn print_language<W>(sink: &mut W, pub fn print_inaccuracy_warning<W>(sink: &mut W) -> io::Result<()> where W: Write {     writeln!(sink, "Note: results can be inaccurate for languages marked with '{}'", IDENT_INACCURATE) }++// This is for a best efforts approach where we use box drawing characters+// for the separator lines, but only if we can easily determine that+// the terminal encoding is set to UTF8. We use the POSIX environment variables for that.+//+// The environment variables are not set by default under windows except in posix-y+// environments like WSL, cygwin, MSYS2.+// Unicode is badly supported in cmd.exe and powershell and not activated by default+// so we just fall back on ASCII there without checking the so called code page.+//+// The variables are assumed to follow XGP syntax:+// `language[_territory[.codeset]][@modifier]`+// https://www.gnu.org/software/libc/manual/html_node/Locale-Names.html+pub fn locale_requests_utf8() -> bool {+    // LC_ALL overrides LC_CTYPE which overrides LANG+    // LC_CTYPE is the locale category used for the same purpose in the `tree` utility+    let env_variables = ["LC_ALL", "LC_CTYPE", "LANG"];+    let env = env_variables.iter()+        .map(|&env| std::env::var(env))+        .find(|env|+            // filter out unset and empty variables+            env != &Err(std::env::VarError::NotPresent)+                && env != &Ok("".to_owned())
                && env != &Ok(String::new())
Emerentius

comment created time in 25 days

PR closed XAMPPRocky/tokei

Access files to analyze through FileAccess trait

This pushes the abstractions available to provide files for analysis down a bit, and exposes a refactored, lower-level version of get_statistics that allows you to provide an iterator of FileAccess objects for analysis.

This allows you to analyze non-filesystem like things, like tar and zip archives. Or in-memory collections of files by building an implementation of FileAccess.

A simple example would look something like (warning: not tested):

use std::io;

struct FakeFile {
    name: String,
    content: String,
}

impl<'a> FileAccess<'a> for &'a FakeFile {
    fn read_to_string(self) -> io::Result<String> {
        Ok(self.content.clone())
    }

    fn read_first_line(self) -> io::Result<String> {
        let line = self.content.split("\n").next().map(|s| s.to_string()).unwrap_or_else(|| self.content.to_string());
        Ok(line)
    }

    fn name(self) -> Cow<'a, str> {
        Cow::from(&self.name)
    }

    fn file_name(self) -> Option<Cow<'a, str>> {
        Some(self.name.rsplit("/").next().map(Cow::from).unwrap_or_else(|| Cow::from(&self.name)))
    }

    fn extension(self) -> Option<Cow<'a, str>> {
        match self.file_name() {
            Some(Cow::Borrowed(n)) => n.rsplit(".").next().map(Cow::from),
            Some(Cow::Owned(n)) => n.rsplit(".").next().map(|s| s.to_string()).map(Cow::from),
            None => None,
        }
    }
}
+157 -71

4 comments

7 changed files

udoprog

pr closed time in 25 days

PR closed XAMPPRocky/tokei

Introduce `Bytes` to support processing of non-UTF-8 files.

I was trying to use tokei to analyze older versions of the Linux kernel and noticed that it had issues with files containing comments which were encoded in iso-8859-1.

Because DecodeReaderBytes wasn't actually configured to use any encoding it fell back to using UTF-8, unless a BOM was present. BOMs are exceedingly rare when dealing with code files in my experience, but it's still something that we should re-incorporate here before merging to maintain the old behavior. My suggestion would be to perform an explicit check of the two first bytes in the stream (see TODO).

Unfortunately file encodings tend to be determined by build systems rather than the files themselves. But we can do other things like look for vim comments (e.g. # vim: set fileencoding=).

While reading through the code, I noticed that the analysis performed by tokei didn't use a ton of string APIs, so I built the Bytes abstraction to handle all the cases that were needed to operate directly on top of a &[u8] slice.

Any char inspection that we do now tries to decode a line using a method called utf8_chars_lossy(), which replaces any illegal utf-8 sequences with a replacement character U+FFFD.

TODO

  • [x] Check BOM.
  • [x] Test for binary files
    • this was done before because DecodeReaderBytes always attempted to decode at least as UTF-8.
+284 -37

10 comments

6 changed files

udoprog

pr closed time in 25 days

pull request commentXAMPPRocky/tokei

Introduce `Bytes` to support processing of non-UTF-8 files.

Thank you again for this PR. I've decided to go for a simpler implementation that allows for parsing non utf8 files. It's smaller and so introduces a smaller maintenance burden on myself. Please do continue to contribute though, I appreciate all of the work people contribute even if it doesn't make it in the main tree.

udoprog

comment created time in 25 days

push eventXAMPPRocky/tokei

Erin Power

commit sha 2c97dc09aa77b460adb4708bcc96007cea7b44ec

Added non UTF8 parsing

view details

Erin Power

commit sha 2c41fdb182b7ba1bcc7c9d1cfc0de569538e7f0d

Fixed clippy lints

view details

push time in 25 days

push eventXAMPPRocky/remove_dir_all

Alex Touchet

commit sha 6e0fae3c4cda64db92cde716c35d04c774525ea0

Update URLs (#11)

view details

push time in a month

PR merged XAMPPRocky/remove_dir_all

Update URLs
+2 -2

1 comment

2 changed files

atouchet

pr closed time in a month

pull request commentXAMPPRocky/remove_dir_all

Update URLs

Thank you for your PR, and congrats on your first contribution!

atouchet

comment created time in a month

issue commentXAMPPRocky/remove_dir_all

Missing STRUCT_SIZE on aarch64

Thank you for your issue! I don't have any way to test on that platform, so someone else will need to provide a fix for this.

jdm

comment created time in a month

issue closedXAMPPRocky/tokei

Semantic nested comments for clojure

I attempted to implement clojure comment blocks, but the current nested language parsing doesn't handle them as the (comment block is seen as ending at the first closing ):

(comment 
  (if (foo) bar)
  still a comment line
)

Some cases might be tricky to handle - clojure (comment blah) blocks are handled by a macro that is processed after ; comments are removed, so this is valid:

(comment blah blah
   (nested stuff
    ; nested line comment ignored including )))s
  )
)

And clojure also has a comment reader macro #_( which is even more lenient:

#_( allows: invalid syntax! As long as parens match)

But 99% of cases would be handled if you could just specify that (comment and #_( ignore any nested parenthesis pairs.

closed time in a month

kornysietsma

issue commentXAMPPRocky/tokei

Semantic nested comments for clojure

Thank you for your issue! Sorry for the late reply. I don't think it is in the scope of Tokei to count anything that would require a language specific parser. With being a general language code counter there is always going to be some amount of accuracy lost.

kornysietsma

comment created time in a month

PR opened rust-lang/rust

Updated my mailmap entry
+1 -1

0 comment

1 changed file

pr created time in a month

push eventXAMPPRocky/rust

Jeremy Fitzhardinge

commit sha 08b0aca05e3709766fd7e0e01ec56a8511e4c46b

string: implement From<&String> for String Allow Strings to be created from borrowed Strings. This is mostly to make things like passing &String to an `impl Into<String>` parameter frictionless.

view details

Chris Gregory

commit sha eba03d462e987a969d21aa74632e4d96dbe9751e

Fix convert module's documentation links

view details

Chris Gregory

commit sha 6bf94cd3ff4af69c8128fb64d28a60f6c9385c19

Remove dangling ` in Into documentation

view details

Chris Gregory

commit sha b701d32ca80e58d41cadc18755567794d5e65bd9

Remove broken links to self in Into documentation

view details

Chris Gregory

commit sha 4a33ece38216a42764a0c74ae99baf183b888817

Remove blank lines in AsRef documentation

view details

Chris Gregory

commit sha 27ff5360ab661a3c20ab7256529aeb61b4e2b215

Reorder blank lines in AsMut documentation

view details

Chris Gregory

commit sha 1e48da6c81ba407b83189adff90abbd224dc1b62

Escape &str in convert docs

view details

Chris Gregory

commit sha 1f5d510604be553906cdcbb2eddaf5277faf543d

Fix stray ` in previous change

view details

Hoàng Đức Hiếu

commit sha 9982e7d4071c3964e8212e3c547a7aaa4e12f01e

lint: convert incoherent_fundamental_impls into hard error Also remove it from lint listings.

view details

Guillaume Gomez

commit sha 5971266301e76a0f9ea131996cf699b18eaa7c89

Fixes attributes position in types decl

view details

Guillaume Gomez

commit sha 19f1bade5fd8efb5e036ed2fadc0abd397cecb9f

Fix items alignment

view details

Guillaume Gomez

commit sha f20d586c6fe90ac29f71b9568bd67e81e676c112

Update test

view details

Kyle Huey

commit sha 3e86cf36b5114f201868bf459934fe346a76a2d4

Add implementations of last in terms of next_back on a bunch of DoubleEndedIterators. r?Manishearth

view details

Andrew Xu

commit sha f77b602a78f7df7080801c25964cad3f2b07e3ab

Fix broken link in rustc_plugin doc

view details

Matthew Jasper

commit sha d9ea132b7322cebd595598a0639cf6018816d454

Explain error when yielding a reference to a local variable

view details

Ralf Jung

commit sha 4cb6d1c523ce375388622477e8020117a89d0c1d

deny -> warn

view details

Felix Rabe

commit sha 28234751bca49922023f1653f67831a81d038461

Outdent example, preserving nested fence

view details

Daiki Mizukami

commit sha 902904a79a5498438e93f41d728615b54c679f19

std: Derive `Default` for `io::Cursor`

view details

Simon Sapin

commit sha 885a001788d18dbbde14587e1dbccca0dad73776

const-stabilize NonNull::dangling and NonNull::cast

view details

David Wood

commit sha 8a47e088458866b6dd8aa28acc9db1e9e22be997

Add test for current behaviour. This commit adds a test that causes a suggestion to replace `extern crate` with `use` when doing so would cause a compliation error, as the new name of the import would not be added to the prelude if a `use` was used.

view details

push time in a month

push eventXAMPPRocky/remove_dir_all

Guillaume Gomez

commit sha ed728d811f19cf12b4649fb9dbb7bf62930ba221

Add tests for README file (#9)

view details

push time in a month

pull request commentXAMPPRocky/remove_dir_all

Add tests for README file

Thank you for your PR, and congrats on your first contribution!

GuillaumeGomez

comment created time in a month

push eventXAMPPRocky/Mammut

Klaus Purer

commit sha e072925541aaee193cdda1cf091177df932f8305

fix(media): Fix image upload by using the correct parameter name (#48)

view details

push time in a month

PR merged XAMPPRocky/Mammut

fix(media): Fix image upload by using the correct parameter name

Follow up to #46, fixes #47

+1 -1

1 comment

1 changed file

klausi

pr closed time in a month

issue closedXAMPPRocky/Mammut

Uploading image attachments is broken

The upload photo example does not work with the mastodon.social server:

$ cargo run --example upload_photo
   Compiling mammut v0.12.0 (/home/klausi/workspace/Mammut)
    Finished dev [unoptimized + debuginfo] target(s) in 3.53s
     Running `target/debug/examples/upload_photo`
Enter the path to the photo you'd like to post: 
test.jpg
Error: Api(ApiError { error: None, error_description: None })

The response from the Mastodon server is:

{
  "id": "14765098",
  "type": "unknown",
  "url": "https://mastodon.social/files/original/missing.png",
  "preview_url": "https://mastodon.social/files/small/missing.png",
  "remote_url": null,
  "text_url": "https://mastodon.social/media/_X2BWQQcaR_gAi5SfYU",
  "meta": null,
  "description": null,
  "blurhash": null
}

Why does the server return an unknown type? How do we tell the server that this is just a JPG image it should accept?

closed time in a month

klausi

pull request commentXAMPPRocky/Mammut

fix(media): Fix image upload by using the correct parameter name

Thank you for your PR!

klausi

comment created time in a month

issue commentXAMPPRocky/Mammut

Uploading image attachments is broken

@klausi Thank you for your issue! I've gone ahead added debug logging to requests. So if you now trigger debug level logging, mammut should should now print out the debug info of all requests and responses.

klausi

comment created time in a month

push eventXAMPPRocky/Mammut

Erin

commit sha 4bf00ae49c57647e37847ab4003a6986547a05ad

Updated code to be 2018 edition compatible

view details

Erin

commit sha f8dfca50432a4cfe498e52a182a97690f1af29c0

Added debug logging to the requests

view details

push time in a month

push eventXAMPPRocky/tokei

Erin

commit sha 86c59b2b0a53a099e281df9c84fe55cafc6fa49f

Added back changes lost from force push I accidentally forced pushed and lost two commits. Co-authored-by: mlvzk <mlvzk@pm.me> Co-authored-by: Adam Thalhammer <ocisly@users.noreply.github.com>

view details

push time in a month

push eventXAMPPRocky/tokei

Erin

commit sha d9bfe81174802471ca8d294cb97234be9d95194e

Added ASN.1 Support

view details

push time in a month

issue opened1aim/asn1

Parameterisation

Parameterisation is currently parsed, but we don't currently generate or analyse any parameterised ASN.1 notation code.

Support

  • [ ] Notation
    • Parsing
    • Semantic Analysis
    • Code Generation

References

  • Notation X.683

created time in a month

issue opened1aim/asn1

Constraints

Constraints are currently parsed but they are ignored. The semantic analyser should use the constraints to enforce those constraints on the ASN.1 notation, so that we don't allow people to have an invalid assignment in their ASN.1 code. The constraints also need to be used by the code generator to generate encoders and decoders that enforce those constraints at encoding/decoding time.

Support

  • [ ] Encoding/Decoding
  • [ ] Notation
    • Parsing
    • Semantic analysis
    • Code generation

References

  • Notation X.682

created time in a month

more