Skip to content

Patch mx thirdpartydeps to print URLs of libraries that have multiple URLs & include urlbase #292

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JohnTortugo
Copy link
Contributor

Can I please get some reviews on this small patch to address the issue mentioned in #291

Tested on Linux x86_64 and OSX AArch64

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 17, 2025
@dougxc
Copy link
Member

dougxc commented Apr 18, 2025

@matneu can you please review this PR to ensure the enhanced output does not cause problems for current consumers of this 3rd party info.

@dougxc
Copy link
Member

dougxc commented Apr 22, 2025

@JohnTortugo this change is causing a gate to fail:

test_maven_projects('wrong artifact ID')
  File "/b/b/e/path with a space/mx.py", line 31, in <module>
    runpy.run_module("mx")
  File "/cm/shared/apps-ol7/python3/3.8.10/lib/python3.8/runpy.py", line 210, in run_module
    return _run_code(code, {}, init_globals, run_name, mod_spec)
  File "/cm/shared/apps-ol7/python3/3.8.10/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/b/b/e/path with a space/src/mx/__main__.py", line 49, in <module>
    _main_wrapper()
  File "/b/b/e/path with a space/src/mx/_impl/mx.py", line 18492, in _main_wrapper
    main()
  File "/b/b/e/path with a space/src/mx/_impl/mx.py", line 18476, in main
    retcode = c(command_args)
  File "/b/b/e/path with a space/src/mx/_impl/mx_commands.py", line 145, in __call__
    return self.command_function(*args, **kwargs)
  File "/b/b/e/path with a space/src/mx/_impl/mx_gate.py", line 493, in gate
    _run_gate(cleanArgs, args, tasks)
  File "/b/b/e/path with a space/src/mx/_impl/mx_gate.py", line 703, in _run_gate
    _run_mx_suite_tests()
  File "/b/b/e/path with a space/src/mx/_impl/mx_gate.py", line 600, in _run_mx_suite_tests
    test_maven_projects.tests()
  File "/b/b/e/path with a space/tests/test_maven_projects.py", line 228, in tests
    test_maven_project()
  File "/b/b/e/path with a space/tests/test_maven_projects.py", line 143, in test_maven_project
    create_project(pomtext_basic, tmpdir, ["JUNIT", "JUNIT_TOOL"], [])
  File "/b/b/e/path with a space/tests/test_maven_projects.py", line 129, in create_project
    return mx.MavenProject(
  File "/b/b/e/path with a space/src/mx/_impl/mavenproject.py", line 192, in __init__
    mx.abort(f"MavenProject {self.name} should match artifactId to project name {self.pom['artifactId'].text}")
  File "/b/b/e/path with a space/src/mx/_impl/support/logging.py", line 277, in abort
    traceback.print_stack()
MavenProject tmpygxjfxa5 should match artifactId to project name testpom

It should be reproducible with:

mx gate -t MxTests

@JohnTortugo
Copy link
Contributor Author

Thank you for reviewing @dougxc . I'll take a look

@JohnTortugo
Copy link
Contributor Author

@dougxc - I'm getting a similar error message even when I run mx gate on the master branch:

MavenProject tmpwqpd9gfd should match artifactId to project name testpom

I don't get a stacktrace like in your case though, even if I run the command on top of my changes. Perhaps this problem is not related to this patch?

@dougxc
Copy link
Member

dougxc commented May 20, 2025

Sorry, the fatal error (reported by the pylint step of the gate is):

src/mx/_impl/mx.py:17511:0: W0311: Bad indentation. Found 16 spaces, expected 12 (bad-indentation)
src/mx/_impl/mx.py:17512:0: W0311: Bad indentation. Found 16 spaces, expected 12 (bad-indentation)
src/mx/_impl/mx.py:17513:0: W0311: Bad indentation. Found 20 spaces, expected 16 (bad-indentation)
src/mx/_impl/mx.py:17514:0: W0311: Bad indentation. Found 24 spaces, expected 20 (bad-indentation)
src/mx/_impl/mx.py:17515:0: W0311: Bad indentation. Found 28 spaces, expected 24 (bad-indentation)
src/mx/_impl/mx.py:17516:0: W0311: Bad indentation. Found 28 spaces, expected 24 (bad-indentation)
src/mx/_impl/mx.py:17517:0: W0311: Bad indentation. Found 32 spaces, expected 28 (bad-indentation)
src/mx/_impl/mx.py:17518:0: W0311: Bad indentation. Found 28 spaces, expected 24 (bad-indentation)
  File "/b/b/e/path with a space/mx.py", line 31, in <module>
    runpy.run_module("mx")
  File "/cm/shared/apps-ol7/python3/3.8.10/lib/python3.8/runpy.py", line 210, in run_module
    return _run_code(code, {}, init_globals, run_name, mod_spec)
  File "/cm/shared/apps-ol7/python3/3.8.10/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/b/b/e/path with a space/src/mx/__main__.py", line 49, in <module>
    _main_wrapper()
  File "/b/b/e/path with a space/src/mx/_impl/mx.py", line 18592, in _main_wrapper
    main()
  File "/b/b/e/path with a space/src/mx/_impl/mx.py", line 18576, in main
    retcode = c(command_args)
  File "/b/b/e/path with a space/src/mx/_impl/mx_commands.py", line 145, in __call__
    return self.command_function(*args, **kwargs)
  File "/b/b/e/path with a space/src/mx/_impl/mx_gate.py", line 493, in gate
    _run_gate(cleanArgs, args, tasks)
  File "/b/b/e/path with a space/src/mx/_impl/mx_gate.py", line 722, in _run_gate
    if mx.command_function('pylint')(['--primary']) != 0:
  File "/b/b/e/path with a space/src/mx/_impl/mx_commands.py", line 145, in __call__
    return self.command_function(*args, **kwargs)
  File "/b/b/e/path with a space/src/mx/_impl/mx.py", line 15291, in pylint
    run([pylint_exe, '--reports=n', '--disable=cyclic-import', '--rcfile=' + rcfile, _pkg_path] + additional_options, env=env)
  File "/b/b/e/path with a space/src/mx/_impl/mx.py", line 13649, in run
    abort(retcode)
  File "/b/b/e/path with a space/src/mx/_impl/support/logging.py", line 277, in abort
    traceback.print_stack()

I'll fix this myself and try merge again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants