WARNING of duplicate C++ declaration/object description (for namespace) when use "doxygenfile" objective for different source files - duplicates

I want to use doxygen and sphinx to generate documents for source file, in the rst file, I use "doxygenfile" to introduce the source file, like
.. doxygenfile:: Headerfile1.hpp
:project: MyProject
.. doxygenfile:: Headerfile2.hpp
:project: MyProject
As the classes in the two headerfile is defined in the same namespace, so they both have a same namespace delcare:
namespace Namespace_xxx
{
...
definitions ...
...
}
When build, a warning is reported like:
WARNING: Duplicate C++ declaration, also defined at XXX :17.
Declaration is '.. cpp:type:: Namespace_xxx'.
And the same situation for python file, a warning like:
WARNING: duplicate object description of <module_name>, when I import submodule from the same module in different .py and introduce them to the rst by "doxygen".
Why sphinx recognize reference of namespace or module as duplicated declaration? How to fix this problem?
I tried to use :noindex: true option, but it reported that "noindex" is not a valid option for "doxygenfile" when build

Related

File name of a BIML-generated package

Well, it looks like a simple thing but I can't find an answer. The name of an SSIS package can't contain dots so 'Step1 Load' is a valid name but 'Step1.Load' is not. Sadly, we have a naming standard that uses dots... Can I specify a file name for a package? I use BIMLExpress and VS2019.
Thank you!
I have no problem making this Biml work.
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Packages>
<Package Name="SO.63451166" />
<Package Name="Step1.Load" />
</Packages>
</Biml>
That results in two packages being created with dots in the file name.
I did notice in build from BimlStudio that it warns of invalid characters
warning : Warning:Node: SO.63451166: Package Property:Name The name for AstPackageNode SO.63451166 in package SO.63451166 includes invalid characters (/:[].=) for SSIS. The invalid characters will be replaced with underscores (_) when the package is emitted for SSIS. This may cause duplicate names in SSIS if the invalid characters were making the name unique. Please use a name that does not include invalid characters for SSIS.
But, that's only talking about the Name property of the package. Everything in SSIS has a Name property that is required and can't contain the aforementioned characters. The physical filename can be anything that is valid for your Operating System. Generally the package and the physical file name are similar (file name having the .dtsx) extension but in cases where you specify period, the engine is going to replace with underscores.
Attempting to use a period in the Name of an object in SSIS is going to raise an error of "Property value is not valid."
The object name "SO.63451166" is not valid. The name cannot contain any of the following characters: / \ : [ ] . =
Using the supplied Biml, the package Name properties are SO_63451166 and Step1_Load while the files themselves are named SO.63451166.dtsx and Step1.Load.dtsx

How to include files in icarus verilog?

I know the basic `include "filename.v" command. But, I am trying to include a module which is in another folder. Now, that module further includes other modules present in the same folder. But, when I try to run the module on the most top-level, I am getting an error.
C:\Users\Dell\Desktop\MIPS>iverilog mips.v
./IF/stage_if.v:2: Include file instruction_memory_if.v not found
No top level modules, and no -s option.
Here, I am trying to make a MIPS processor, which is contained in the file "mips.v". The first statement of this file is "`include "IF/stage_if.v". And, in the IF folder, there are numerous files present which I have included in stage_if.v, one of which is "instruction_memory_if.v". Below is the directory level diagram.
-IF
instruction_memory_if.v
stage_if.v
+ID
+EX
+MEM
+WB
mips.v
You need to tell iverilog where to look using the -I flag.
In top.v:
`include "foo.v"
program top;
initial begin
foo();
end
endprogram
In foo/foo.v:
task foo;
$display("This was printed in the foo module");
endtask
Which can be run using the commands:
iverilog -g2012 top.v -I foo/
vvp a.out
>>> This was printed in the foo module

Setting Jenkins build name from package.json version value

I want to include the value of the "version" parameter in package.json as part of the Jenkins build name.
I'm using the Jenkins Build Name Setter plugin - https://wiki.jenkins-ci.org/display/JENKINS/Build+Name+Setter+Plugin
So far I've tried to use PROPFILE syntax in the "Build name macro template" step:
${PROPFILE,file="./mainline/projectDirectory/package.json",property="\"version\""}
This successfully creates a build, but includes the quotes and comma surrounding the value of the version property in package.json, for example:
"0.0.1",
I want just the value inside returned, so it reads
0.0.1
How can I do this? Is there a different plugin that would work better for parsing package.json and getting it into the template, or should I resort to some sort of regex for removing the characters I don't want?
UPDATE:
I tried using token transforms based on reading the Token Macro Plugin documentation, but it's not working:
${PROPFILE%\"\,#\",file="./mainline/projectDirectory/package.json",property="\"version\""}
still just returns
However, using only one escaped character and only one of # or % works. No other combinations I tried work.
${PROPFILE%\,,file="./mainline/projectDirectory/package.json",property="\"version\""}
which returns "0.0.1" (comma removed)
${PROPFILE#\"%\"\,,file="./mainline/projectDirectory/package.json",property="\"version\""}
which returns "0.0.1", (no characters removed)
UPDATE:
Tried to use the new Jenkins Token Macro plugin's JSON macro with no luck.
Jenkins Build Name Setter set to update the build name with Macro:
${JSON,file="./mainline/pathToFiles/package.json",path="version"}-${P4_CHANGELIST}
Jenkins build logs for this job show:
10:57:55 Evaluated macro: 'Error processing tokens: Error while parsing action 'Text/ZeroOrMore/FirstOf/Token/DelimitedToken/DelimitedToken_Action3' at input position (line 1, pos 74):
10:57:55 ${JSON,file="./mainline/pathToFiles/package.json",path="version"}-334319
10:57:55 ^
10:57:55
10:57:55 java.io.IOException: Unable to serialize org.jenkinsci.plugins.tokenmacro.impl.JsonFileMacro$ReadJSON#2707de37'
I implemented a new macro JSON, which takes a file and a path (which is the key hierarchy in the JSON for the value you want) in token-macro-2.1. You can only use a single transform per macro usage.
Try the token transformations # and % (see Token-Makro-Plugin):
${PROPFILE#"%",file="./mainline/projectDirectory/package.json",property="\"version\""}
(This will only help if you are using pipelines. But for what it's worth,..)
What works for me is a combination of readJSON from the Pipeline Utility Steps plugin and directly setting currentBuild.displayName, thusly:
script {
// readJSON from "Pipeline Utility Steps"
def packageJson = readJSON file: 'package.json'
def version = packageJson.version
echo "Setting build version: ${packageJson.version}"
currentBuild.displayName = env.BUILD_NUMBER + " - " + packageJson.version
// currentBuild.description = "other cool stuff"
}
Omitting error handling etc obvs.

How do I make a Makefile target depend on a file that only possibly exists?

I have a set of files of the form [name].c, some of which #include an associated [name].h file. I want a makefile target that re-builds [name].o if [name].c or [name].h are modified. I tried:
$(OBJDIR)/%.o : $(SRCDIR)/%.c $(SRCDIR)/%.h
#Implementation of target omitted
However, for the .c files that don't have associated .h files, make complains on the above rule. I tried:
$(OBJDIR)/%.o : $(SRCDIR)/%.c $(wildcard $(SRCDIR)/%.h)
#Implementation of target omitted
This builds, but modifying the .h files does not trigger a rebuild. Is there some reason I can't use % in this way?
Note: I'm trying to avoid a solution that uses makedeps.pl or makefile generation (because I am not actually working with .c or .h files).
Your attempt won't work because variables and functions that appear as part of target or prerequisite lists are expanded immediately, when the makefile is read in. At that point, obviously, there's no way to know what % might expand to later, when make is trying to figure out how to build targets, so it's actually expanding the literal string <srcdir>/%.h of which presumably there is none.
One answer is to move the prerequisites to a separate rule:
$(OBJDIR)/foo.o : $(wildcard $(SRCDIR)/foo.h)
$(OBJDIR)/bar.o : $(wildcard $(SRCDIR)/bar.h)
$(OBJDIR)/baz.o : $(wildcard $(SRCDIR)/baz.h)
If you don't want to have to write this out, you can use eval to do it for you: suppose you have a variable listing the object files:
OBJECTS = foo.o bar.o baz.o
$(foreach O,$(OBJECTS),$(eval $(OBJDIR)/$O : $(wildcard $(SRCDIR)/$(O:.o=.h))))
(that might not be exactly right).
Alternatively, you can enable .SECONDEXPANSION and write:
.SECONDEXPANSION:
$(OBJDIR)/%.o : $(SRCDIR)/%.c $$(wildcard $(SRCDIR)/%.h)
#Implementation of target omitted
(note the extra $ escaping the wildcard function).

Tcl error: command already exists in namespace "::"

What means this error?
command already exists in namespace "::"
Can you provide simple case when this error raises?
That's (probably) an error thrown by the [incr Tcl] core when you try to do something like defining an itcl class with the same name as an existing command that isn't already a class; the part you left out (in quotes, between “command” and “already”) was the name of the command that you were trying to override. For example (the subst is fairly arbitrary here):
% package require itcl
4.0b7
% itcl::class subst {}
command "subst" already exists in namespace "::"
No command that is a “standard” part of Tcl itself (and not an extension package or user code) generates an error that's remotely close.
As for how to fix… don't use the same name as an existing non-class. What this means in the context of your code though, I don't know. You don't reveal enough information for me to work out the deeper reason why you might be having this problem in the first place.