Skip to content

Conversation

@maennchen
Copy link
Contributor

Check the individual commits for details.

Follow up of #11210 (review)

@codecov
Copy link

codecov bot commented Dec 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.41%. Comparing base (b2428f8) to head (0a91a26).

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #11221   +/-   ##
=========================================
  Coverage     57.41%   57.41%           
  Complexity     1705     1705           
=========================================
  Files           346      346           
  Lines         12875    12875           
  Branches       1228     1228           
=========================================
  Hits           7392     7392           
  Misses         5005     5005           
  Partials        478      478           
Flag Coverage Δ
funTest-external-tools 13.67% <ø> (-0.01%) ⬇️
funTest-no-external-tools 30.93% <ø> (ø)
test-ubuntu-24.04 42.40% <ø> (ø)
test-windows-2025 42.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Use typed enums for Package.SourceType and Requirement.SourceType
instead of raw strings like "hex", "git", and "local". This improves
type safety and enables exhaustive when expressions.

Signed-off-by: Jonatan Männchen <[email protected]>
Replace lazy property with factory function to ensure test isolation.
Each test now gets its own Gleam instance instead of sharing one.

Signed-off-by: Jonatan Männchen <[email protected]>
Move Link, Repository, and Dependency types inside GleamToml as nested
classes. Rename GleamDependency to GleamToml.Dependency and convert
findHomepageUrl from extension function to member function.

Signed-off-by: Jonatan Männchen <[email protected]>
@maennchen maennchen force-pushed the sosef/gleam-graph-builder branch 2 times, most recently from 390d424 to b9c3cae Compare December 13, 2025 16:22
Remove fields that are parsed but never used by the plugin:
- GleamManifest.requirements map and Requirement class
- GleamManifest.Package.buildTools and otpApp fields
- HexPackageInfo.latestStableVersion field

Signed-off-by: Jonatan Männchen <[email protected]>
Use default empty collections for packages and requirements fields,
simplifying construction of empty manifests.

Signed-off-by: Jonatan Männchen <[email protected]>
Replace scope-based dependency resolution with DependencyGraphBuilder
for consistent graph format across package managers. Extract dependency
handling logic into GleamDependencyHandler and introduce GleamPackageInfo
and GleamProjectContext types to support the new architecture.

Signed-off-by: Jonatan Männchen <[email protected]>
@maennchen maennchen force-pushed the sosef/gleam-graph-builder branch 2 times, most recently from 0d23fd4 to ef2e56d Compare December 13, 2025 16:27
Fix isValidLocalPath to use startsWith for checking whether a resolved
path is within the working directory. Add test coverage for invalid
path dependencies.

Signed-off-by: Jonatan Männchen <[email protected]>
@maennchen maennchen force-pushed the sosef/gleam-graph-builder branch from ef2e56d to 0a91a26 Compare December 13, 2025 16:28
@maennchen maennchen marked this pull request as ready for review December 13, 2025 16:57
@maennchen maennchen requested a review from a team as a code owner December 13, 2025 16:57
private fun isValidLocalPath(workingDir: File, path: String): Boolean {
val resolvedPath = workingDir.resolve(path).canonicalFile
return resolvedPath.relativeToOrNull(workingDir.canonicalFile) != null
return resolvedPath.startsWith(workingDir.canonicalFile)
Copy link
Member

Choose a reason for hiding this comment

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

Does the path really need to be within workingDir or would it suffice to check resolvedPath.startsWith(analysisRoot) ?

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