Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small improvements to the devcontainer #2522

Merged
merged 9 commits into from
Sep 16, 2024

Conversation

Nereuxofficial
Copy link
Contributor

@Nereuxofficial Nereuxofficial commented Sep 13, 2024

This removes a workaround no longer necessary to install LLVM and updates the rust-analyzer plugin to use the official name, although the old one is aliased to my knowledge.

A possible improvement to the build time of the Devcontainer image would be to utilize cargo-binstall to download the binary release for sccache. Let me know if that is a worthwhile improvement and i'll add it.

Dockerfile Outdated Show resolved Hide resolved
scripts/createAliases.sh Outdated Show resolved Hide resolved
@domenukk
Copy link
Member

Shellcheck isn't happy yet about the createAliases script:

shellcheck ./scripts/*.sh

In ./scripts/createAliases.sh line 6:
LLVMFILES=/usr/bin/llvm*
          ^------------^ SC2[12](https://github.com/AFLplusplus/LibAFL/actions/runs/10873386066/job/30169439681?pr=2522#step:7:13)5 (warning): Brace expansions and globs are literal in assignments. Quote it or use an array.


In ./scripts/createAliases.sh line 7:
CLANGFILES=/usr/bin/clang*
           ^-------------^ SC2125 (warning): Brace expansions and globs are literal in assignments. Quote it or use an array.


In ./scripts/createAliases.sh line [15](https://github.com/AFLplusplus/LibAFL/actions/runs/10873386066/job/30169439681?pr=2522#step:7:16):
	echo "linking" $f "to" $link
                       ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                               ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	echo "linking" "$f" "to" "$link"


In ./scripts/createAliases.sh line [16](https://github.com/AFLplusplus/LibAFL/actions/runs/10873386066/job/30169439681?pr=2522#step:7:17):
	ln -s $f $link
              ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	ln -s "$f" "$link"


In ./scripts/createAliases.sh line [17](https://github.com/AFLplusplus/LibAFL/actions/runs/10873386066/job/30169439681?pr=2522#step:7:18):
	if [ -e $f ]
                ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	if [ -e "$f" ]


In ./scripts/createAliases.sh line [18](https://github.com/AFLplusplus/LibAFL/actions/runs/10873386066/job/30169439681?pr=2522#step:7:19):
	  then cp $link /usr/local/bin/
                  ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	  then cp "$link" /usr/local/bin/

For more information:
  https://www.shellcheck.net/wiki/SC2125 -- Brace expansions and globs are li...
  https://www.shellcheck.net/wiki/SC[20](https://github.com/AFLplusplus/LibAFL/actions/runs/10873386066/job/30169439681?pr=2522#step:7:21)86 -- Double quote to prevent globbing ...
Error: Process completed with exit code 1.

@Nereuxofficial
Copy link
Contributor Author

Shellcheck isn't happy yet about the createAliases script:

shellcheck ./scripts/*.sh

In ./scripts/createAliases.sh line 6:
LLVMFILES=/usr/bin/llvm*
          ^------------^ SC2[12](https://github.com/AFLplusplus/LibAFL/actions/runs/10873386066/job/30169439681?pr=2522#step:7:13)5 (warning): Brace expansions and globs are literal in assignments. Quote it or use an array.


In ./scripts/createAliases.sh line 7:
CLANGFILES=/usr/bin/clang*
           ^-------------^ SC2125 (warning): Brace expansions and globs are literal in assignments. Quote it or use an array.


In ./scripts/createAliases.sh line [15](https://github.com/AFLplusplus/LibAFL/actions/runs/10873386066/job/30169439681?pr=2522#step:7:16):
	echo "linking" $f "to" $link
                       ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                               ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	echo "linking" "$f" "to" "$link"


In ./scripts/createAliases.sh line [16](https://github.com/AFLplusplus/LibAFL/actions/runs/10873386066/job/30169439681?pr=2522#step:7:17):
	ln -s $f $link
              ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	ln -s "$f" "$link"


In ./scripts/createAliases.sh line [17](https://github.com/AFLplusplus/LibAFL/actions/runs/10873386066/job/30169439681?pr=2522#step:7:18):
	if [ -e $f ]
                ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	if [ -e "$f" ]


In ./scripts/createAliases.sh line [18](https://github.com/AFLplusplus/LibAFL/actions/runs/10873386066/job/30169439681?pr=2522#step:7:19):
	  then cp $link /usr/local/bin/
                  ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	  then cp "$link" /usr/local/bin/

For more information:
  https://www.shellcheck.net/wiki/SC2125 -- Brace expansions and globs are li...
  https://www.shellcheck.net/wiki/SC[20](https://github.com/AFLplusplus/LibAFL/actions/runs/10873386066/job/30169439681?pr=2522#step:7:21)86 -- Double quote to prevent globbing ...
Error: Process completed with exit code 1.

Should be fixed now. What are your thoughts on using cargo-binstall to speed up the container building process? @tokatoka @domenukk

@tokatoka
Copy link
Member

what does it do?

@Nereuxofficial
Copy link
Contributor Author

what does it do?

It would allow for the downloading of release builds of cargo subcommands from Github. In the case of sccache this would reduce the time on my local machine from over 2 Minutes to less than ten seconds.

@tokatoka
Copy link
Member

you can add

@domenukk domenukk merged commit 69941f2 into AFLplusplus:main Sep 16, 2024
97 checks passed
@domenukk
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants