Skip to content

Conversation

@zlav
Copy link
Member

@zlav zlav commented Mar 14, 2025

Overview

We currently have issues parsing binary and map formats inside of rebar.config files. This PR addresses those issues.

Example code below
# - Map syntax
<< and >> - Binary syntax

{hex, [
    {doc, #{provider => ex_doc}}
]}.

{ex_doc, [
    {source_url, <<"https://github.com/beam-telemetry/telemetry">>},
    {extras, [<<"README.md">>, <<"CHANGELOG.md">>, <<"LICENSE">>, <<"NOTICE">>]},
    {main, <<"readme">>}
]}.

Acceptance criteria

Rebar analysis works for the users impacted project.

Testing plan

Not done yet.

  1. Test with the problem file in the ticket (lines affected posted above)
  2. Test with more than 4 open source repos to make sure I didn't break anything
  3. Add tests

Risks

I'm tempted to make rebar.config parsing optional because I think it may be doing more harm than good. These two features have been around for I think 7 major versions and we don't support them. They also don't apply to anything that we need out of the file, which is alias data that is not prevalent in any major rebar.config files that I found on GitHub.

References

ANE-2306: Implement rebar config fix

Checklist

  • I added tests for this PR's change (or explained in the PR description why tests don't make sense).
  • If this PR introduced a user-visible change, I added documentation into docs/.
  • If this PR added docs, I added links as appropriate to the user manual's ToC in docs/README.ms and gave consideration to how discoverable or not my documentation is.
  • If this change is externally visible, I updated Changelog.md. If this PR did not mark a release, I added my changes into an ## Unreleased section at the top.
  • If I made changes to .fossa.yml or fossa-deps.{json.yml}, I updated docs/references/files/*.schema.json AND I have updated example files used by fossa init command. You may also need to update these if you have added/removed new dependency type (e.g. pip) or analysis target type (e.g. poetry).
  • If I made changes to a subcommand's options, I updated docs/references/subcommands/<subcommand>.md.

@zlav zlav requested a review from a team as a code owner March 14, 2025 00:34
@zlav zlav requested a review from csasarak March 14, 2025 00:34
@zlav zlav marked this pull request as draft March 14, 2025 00:34
@zlav zlav marked this pull request as ready for review March 14, 2025 00:53
Copy link
Contributor

@csasarak csasarak left a comment

Choose a reason for hiding this comment

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

Looks good! All of my comments are optional.

@zlav zlav enabled auto-merge (squash) March 18, 2025 19:38
@zlav zlav merged commit c21ae8a into master Mar 18, 2025
19 checks passed
@zlav zlav deleted the fix/ANE-2036-rebar-map-and-binary-parser branch March 18, 2025 19:40
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