useblocks / sphinx-needs

Adds needs/requirements to sphinx
https://sphinx-needs.readthedocs.io/en/latest/index.html
MIT License
210 stars 66 forks source link

Hardcoded build path in esbonio.py file #633

Closed MohSam1 closed 1 month ago

MohSam1 commented 2 years ago

I have a different out directory name (eg: _out), so the json is generated at _out/needs/needs.json, but in the below file https://github.com/useblocks/sphinxcontrib-needs/blob/master/sphinx_needs/lsp/esbonio.py

The build directory is hard coded to start with _build, this causes the extension fail continuously with below error.

raise FileNotFoundError(f"JSON file not found: {​​json_file}​​")

Can you please check if this is an issue ?

LOC - 89

needs_json = confdir / "_build/needs/needs.json"
haiyangToAI commented 2 years ago

Hi @MohSam1,

Thanks for reporting this.

Yes, currently the needs.json path is hard coded by default there. It doesn't check the config of esbonio.sphinx.buildDir yet. I am on it now.

danwos commented 2 years ago

@haiyangToAI Is this done with #637? If yes I think there are no docs for this feature.

haiyangToAI commented 2 years ago

Hi @danwos,

yes, this issue is fixed.

In the docs I just mentioned in the usage section: https://github.com/useblocks/sphinx-needs/blob/master/docs/ide/index.rst#usage.

I didn't thought this as a feature. I think it makes sense to update it to the docs.

chrisjsewell commented 1 month ago

the esbonio module is no longer part of sphinx-needs