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

fix: prevent scaffolding dead code #280

Merged
merged 5 commits into from
May 14, 2024

Conversation

c12i
Copy link
Collaborator

@c12i c12i commented May 9, 2024

This PR prevents scaffolding from optimistically adding code/ variables that don't get used immediately they are genereated, leading to these warnings getting produced when compiling.

 --> dnas/test/zomes/coordinator/users/src/artist.rs:94:9
   |
94 |     let record = match details {
   |         ^^^^^^ help: if this is intentional, prefix it with an underscore: `_record`
   |
   = note: `#[warn(unused_variables)]` on by default

@c12i c12i requested review from pdaoust and matthme May 9, 2024 08:49
@c12i c12i self-assigned this May 9, 2024
Copy link
Collaborator

@pdaoust pdaoust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some non-blocking change requests to address DRYness and readability.

src/scaffold/collection/coordinator.rs Show resolved Hide resolved
src/scaffold/collection/coordinator.rs Show resolved Hide resolved
src/scaffold/collection/coordinator.rs Show resolved Hide resolved
src/scaffold/entry_type/coordinator.rs Show resolved Hide resolved
@c12i c12i force-pushed the prevent-scaffolding-dead-code branch from 4ecad64 to 8d1aff9 Compare May 10, 2024 13:38
@c12i c12i requested a review from pdaoust May 10, 2024 14:17
@c12i c12i added the ShouldBackport/0.3 This change should be backported to develop-0.3 label May 13, 2024
@c12i c12i merged commit a999323 into holochain:develop May 14, 2024
3 of 7 checks passed
c12i added a commit that referenced this pull request May 16, 2024
* fix: invalid entry type fields in vue template (#279)

* fix: prevent unaffected rust files from getting formatted (#281)

* fix: preserve doc comments

* fix: unmodified files getting reformatted by unparse

* refactor map_all_files_rec function

* revert unparse function change

* fix: prevent scaffolding dead code (#280)

* fix: prevent scaffolding dead code

* fix clippy warnings

* improve readability of stringified rust code

* update coordinator functions

* refactor boolean checks

* feat: Add headless template (#267)

* feat: add initial headless template

* include headless template in ui framework choices

* add web-app instructions and prefer explicit hc commands in all package.json templates

* rename instructions template

* fix indentation in instructions

* update instructions

* remove gitkeep

* refactor UiFramework struct

* refactor tempalte config access

* remove assertion

* revert renaming

* revert integrity zome name

* choose non vanilla framework for non hello world examples

* simplify ui framework prompts; update instructions

* update instructions

* Update scripts and instructions

* color code ui frameworks

* templatify web-happ manifest

* fix bug writing invalid template config

* remove unnecessary print statement

* remove unnecessary return statement

* update ui framework try from filetree implementation

* refactor: refactor reserved words check

* update ansi colors for lit and svelte

* Add build happ instruction

* chore: update web-app instructions for headless template

* fix: fix vue example ui server not starting (#284)

* simplify templates_dir

* chore: bump weekly
@c12i c12i removed the ShouldBackport/0.3 This change should be backported to develop-0.3 label May 16, 2024
c12i added a commit to c12i/scaffolding that referenced this pull request May 16, 2024
* fix: prevent scaffolding dead code

* fix clippy warnings

* improve readability of stringified rust code

* update coordinator functions

* refactor boolean checks
c12i added a commit that referenced this pull request May 16, 2024
* feat: Add headless template (#267)

* feat: add initial headless template

* include headless template in ui framework choices

* add web-app instructions and prefer explicit hc commands in all package.json templates

* rename instructions template

* fix indentation in instructions

* update instructions

* remove gitkeep

* refactor UiFramework struct

* refactor tempalte config access

* remove assertion

* revert renaming

* revert integrity zome name

* choose non vanilla framework for non hello world examples

* simplify ui framework prompts; update instructions

* update instructions

* Update scripts and instructions

* color code ui frameworks

* templatify web-happ manifest

* fix bug writing invalid template config

* remove unnecessary print statement

* remove unnecessary return statement

* update ui framework try from filetree implementation

* refactor: refactor reserved words check

* update ansi colors for lit and svelte

* Add build happ instruction

* fix: invalid entry type fields in vue template (#279)

* fix: prevent scaffolding dead code (#280)

* fix: prevent scaffolding dead code

* fix clippy warnings

* improve readability of stringified rust code

* update coordinator functions

* refactor boolean checks

* fix: prevent unaffected rust files from getting formatted (#281)

* fix: preserve doc comments

* fix: unmodified files getting reformatted by unparse

* refactor map_all_files_rec function

* revert unparse function change

* fix: fix vue example ui server not starting (#284)

* bump version
c12i added a commit that referenced this pull request May 20, 2024
* fix: invalid entry type fields in vue template (#279)

* fix: prevent unaffected rust files from getting formatted (#281)

* fix: preserve doc comments

* fix: unmodified files getting reformatted by unparse

* refactor map_all_files_rec function

* revert unparse function change

* fix: prevent scaffolding dead code (#280)

* fix: prevent scaffolding dead code

* fix clippy warnings

* improve readability of stringified rust code

* update coordinator functions

* refactor boolean checks

* feat: Add headless template (#267)

* feat: add initial headless template

* include headless template in ui framework choices

* add web-app instructions and prefer explicit hc commands in all package.json templates

* rename instructions template

* fix indentation in instructions

* update instructions

* remove gitkeep

* refactor UiFramework struct

* refactor tempalte config access

* remove assertion

* revert renaming

* revert integrity zome name

* choose non vanilla framework for non hello world examples

* simplify ui framework prompts; update instructions

* update instructions

* Update scripts and instructions

* color code ui frameworks

* templatify web-happ manifest

* fix bug writing invalid template config

* remove unnecessary print statement

* remove unnecessary return statement

* update ui framework try from filetree implementation

* refactor: refactor reserved words check

* update ansi colors for lit and svelte

* Add build happ instruction

* chore: update web-app instructions for headless template

* fix: fix vue example ui server not starting (#284)

* simplify templates_dir

* chore: update manual testing docs (#285)

* chore: update manual testing docs

* update override

* fix: bug while scaffolding collection by author (#290)

* fix: bug while scaffolding collection by author

* fix initial insert statement

* chore: bump weekly
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.

None yet

3 participants