Skip to content

Fix compilation warnings and type errors - #159

Merged
ddon merged 2 commits into
BeamLabEU:devfrom
timujinne:dev
Nov 6, 2025
Merged

Fix compilation warnings and type errors#159
ddon merged 2 commits into
BeamLabEU:devfrom
timujinne:dev

Conversation

@timujinne

Copy link
Copy Markdown
Contributor

Summary

  • Fix compilation warnings from clause grouping and unused functions
  • Resolve Dialyzer type errors in storage system
  • Remove problematic :disksup dependency

Changes

Code Quality

  • Group function clauses together (submenu_open?/2, handle_event/3)
  • Remove File module alias conflict in process_file_job.ex
  • Remove unused calculate_file_hash/1 in upload_controller.ex

Type System

  • Fix Storage.retrieve_file/1 return type handling to match {:ok, path, file}
  • Update all callers in process_file_job.ex for correct pattern matching

Dependencies

  • Add sweet_xml dependency to fix ExAws.STS parser compilation
  • Simplify calculate_local_free_space/1 by removing :disksup dependency

Test Plan

  • mix compile passes without warnings
  • mix format applied
  • mix credo --strict passes
  • mix dialyzer passes
  • Pre-commit hooks pass

ExAws.STS requires sweet_xml at compile time to enable XML parsing.
Without it, ex_aws_sts compiles with NO-OP parser that returns raw
XML strings instead of structured data.

Fixed by:
- Adding {:sweet_xml, "~> 0.7"} before ex_aws deps in mix.exs
- Ensuring proper compilation order for conditional parser loading
- Group function clauses together (submenu_open?/2, handle_event/3)
- Remove File module alias conflict in process_file_job.ex
- Fix Storage.retrieve_file/1 return type handling
- Remove unused calculate_file_hash/1 in upload_controller.ex
- Simplify calculate_local_free_space/1 by removing :disksup dependency
- Apply mix format to all storage and component files
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.

2 participants