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

Missed Description for mandatory-home Warning #209

Open
volodya-lombrozo opened this issue Jan 9, 2025 · 11 comments
Open

Missed Description for mandatory-home Warning #209

volodya-lombrozo opened this issue Jan 9, 2025 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@volodya-lombrozo
Copy link
Member

I'm getting the following warning when I check my xmir:

[mandatory-home WARNING]:0 The +home meta is mandatory, but is absent

I don't have home meta and I don't know what I should put here. Please add more human-readable description to this warning and provide instruction that should be done to fix this warning.

There is how I check the xmir:

final Collection < Defect > defects = new Program(new StrictXmir(this.doc)).defects()
    .stream()
    .collect(Collectors.toList());
if (!defects.isEmpty()) {
    throw new IllegalStateException(
        String.format(
            "XMIR is incorrect: %s, %n%s%n",
            defects,
            this.doc
        )
    );
}

Full xmir:
MethodByte.xmir.txt

@volodya-lombrozo
Copy link
Member Author

Blocks: objectionary/jeo-maven-plugin#946

@volodya-lombrozo
Copy link
Member Author

@yegor256 Can you have a look, please?

@yegor256 yegor256 added the bug Something isn't working label Jan 9, 2025
@yegor256
Copy link
Member

yegor256 commented Jan 9, 2025

@h1alexbel can you please help here and provide a better error message. I believe, we should say:

The +home meta is mandatory, but is absent (must contain URL of repository where object sources may be found)

@yegor256
Copy link
Member

yegor256 commented Jan 9, 2025

@volodya-lombrozo in can of JEO, I would put there this URL (for all objects): https://github.com/objectionary/jeo-maven-plugin

@volodya-lombrozo
Copy link
Member Author

@h1alexbel can you please help here and provide a better error message. I believe, we should say:

The +home meta is mandatory, but is absent (must contain URL of repository where object sources may be found)

@yegor256 @h1alexbel It should also contain an example of this meta, otherwise, it's impossible to say which child elements the home meta contains.

@yegor256 Can you provide an example, please?

@h1alexbel
Copy link
Contributor

@yegor256 assign me, please

@h1alexbel
Copy link
Contributor

h1alexbel commented Jan 9, 2025

It should also contain an example of this meta, otherwise, it's impossible to say which child elements the home meta contains.

@yegor256 @volodya-lombrozo I suggest we should implement this, in order to resolve this type of problems. For instance, error messages from mandatory-home will contain the link to HTML page with this document: https://github.com/objectionary/lints/blob/gh-pages/_site/0.0.30/mandatory-home-meta.md. WDYT?

h1alexbel added a commit to h1alexbel/lints that referenced this issue Jan 9, 2025
h1alexbel added a commit to h1alexbel/lints that referenced this issue Jan 9, 2025
h1alexbel added a commit to h1alexbel/lints that referenced this issue Jan 9, 2025
@yegor256
Copy link
Member

@h1alexbel if we put links to each message of each Defect, it will be pretty noisy for the eo-maven-plugin. Maybe it's better to add an explanation to the Javadoc of the Defect, Program.defects(), and Programs.defects().

@h1alexbel
Copy link
Contributor

h1alexbel commented Jan 10, 2025

@yegor256 Should we add a link to the blog post about XMIR? Or to the XMIR documentation? I think that XMIR documentation suits better for this purpose

@yegor256
Copy link
Member

@h1alexbel I suggest we add both links

@h1alexbel
Copy link
Contributor

@yegor256 I will make a PR for this ticket, assign me, please

h1alexbel added a commit to h1alexbel/lints that referenced this issue Jan 10, 2025
h1alexbel added a commit to h1alexbel/lints that referenced this issue Jan 10, 2025
h1alexbel added a commit to h1alexbel/lints that referenced this issue Jan 10, 2025
h1alexbel added a commit to h1alexbel/lints that referenced this issue Jan 10, 2025
yegor256 added a commit that referenced this issue Jan 10, 2025
bug(#209): better defect message in mandatory-home
yegor256 added a commit that referenced this issue Jan 10, 2025
bug(#209): XMIR links in `Program`, `Programs`, `Defect` JavaDoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants