I not sure why there is a cap symbol in pubspec.yaml file under dependencies. See below image.
The project is working even without the cap symbol.
This is called caret syntax:
Caret syntax provides a more compact way of expressing the most common sort of version constraint. ^version means "the range of all versions guaranteed to be backwards compatible with the specified version", and follows pub’s convention for semantic versioning.
So in your example, you've got:
meta: ^1.1.6 - equivalent to >=1.1.6 <2.0
equatable: ^0.2.3 - equivalent to >=0.2.3 <0.3.0
cupertino_icons: ^0.1.2 - equivalent to >=0.1.2 <0.2.0
Related
I'm seeing the following error:
link: package conflict error: google.golang.org/genproto/googleapis/api/annotations: multiple copies of package passed to linker:
#go_googleapis//google/api:annotations_go_proto
#org_golang_google_genproto//googleapis/api/annotations:annotations
Set "importmap" to different paths or use 'bazel cquery' to ensure only one
package with this path is linked.
#org_golang_google_genproto//googleapis/api/annotations:annotations is being brought in through:
#com_github_uber_cadence//service/history:go_default_library
#com_github_uber_cadence//service/history:history
#com_github_uber_cadence//common/resource:resource
#com_github_uber_cadence//common/archiver/provider:provider
#com_github_uber_cadence//common/archiver/gcloud:gcloud
#com_github_uber_cadence//common/archiver/gcloud/connector:connector
#com_google_cloud_go_storage//:storage
#org_golang_google_genproto//googleapis/iam/v1:iam
#org_golang_google_genproto//googleapis/api/annotations:annotations
Can #org_golang_google_genproto//googleapis/api/annotations:annotations be disabled or shadowed by #go_googleapis//google/api:annotations_go_proto? If so, how?
Option I went with:
Change what uses #org_golang_google_genproto//googleapis/api/annotations to use #go_googleapis//google/api:annotations_go_proto instead by using appropriate gazelle:resolve directives in the repositories.bzl file:
go_repository(
name = "com_google_cloud_go",
build_directives = [
# #go_googleapis is the modern version of #org_golang_google_genproto
# use #go_googleapis to avoid dependency conflicts between the two
"gazelle:resolve go google.golang.org/genproto/googleapis/iam/v1 #go_googleapis//google/iam/v1:iam_go_proto", # keep
],
…
)
go_repository(
name = "com_google_cloud_go_storage",
build_directives = [
# #go_googleapis is the modern version of #org_golang_google_genproto
# use #go_googleapis to avoid dependency conflicts between the two
"gazelle:resolve go google.golang.org/genproto/googleapis/iam/v1 #go_googleapis//google/iam/v1:iam_go_proto", # keep
"gazelle:resolve go google.golang.org/genproto/googleapis/type/expr #go_googleapis//google/type:expr_go_proto", # keep
"gazelle:resolve go google.golang.org/genproto/googleapis/api/annotations #go_googleapis//google/api:annotations_go_proto", # keep
],
…
)
The following also works but I preferred the above since it uses the newer library:
Change what uses #go_googleapis//google/api:annotations_go_proto to use #org_golang_google_genproto//googleapis/api/annotations instead by using appropriate gazelle:resolve directives in the root BUILD file:
# gazelle:resolve go google.golang.org/genproto/googleapis/api/annotations #org_golang_google_genproto//googleapis/api/annotations
Other options considered and reasons I didn't go with them:
Upgrade to the latest #com_google_cloud_go_storage. Didn't go with this option because the latest version (v1.24.0 at the time of this post) still uses #org_golang_google_genproto.
Upgrade #com_google_cloud_go_storage to use #go_googleapis. Didn't go with this option because it looked too difficult to get merged.
repo_mapping = {"#org_golang_google_genproto" : "#go_googleapis"} for com_google_cloud_go_storage. Didn't go with this option because #go_googleapis isn't a drop-in replacement for #org_golang_google_genproto (#go_googleapis uses the prefix google while #org_golang_google_genproto uses the prefix googleapis).
"gazelle:exclude **/common/archiver/gcloud/**" for com_github_uber_cadence. Didn't go with this option because common/archiver/provider depends on common/archiver/gcloud.
Set prefix for go_googleapis from google to googleapis. Didn't go with this option because it breaks expectations for those familiar with go_googleapis standard practice.
Code example:
enum ShareType {
NONE('N'),
PUBLISH('P'),
SHARE('S');
final String key;
const ShareType(String keyToSet) {this.key = keyToSet;}
}
gives error:
This requires the 'enhanced-enums' language feature to be enabled.
How do I enable this feature?
Where must this be set?
Go into your pubspec.yaml file in your project and make sure that the minimum version for the sdk are 2.17.0 like:
environment:
sdk: ">=2.17.0 <3.0.0"
The reason for this is that Dart keeps track of when features are introduced and makes sure your project does not make use of features that would not be compatible for the range of versions your project have specified as required.
Recently, I found some issue with different version of tex. In our company, some are using texlive2018 and some are using texlive2017. In our conf.py, I put
latex_elements = {
'preamble': '''\usepackage{chngcntr}
\counterwithin{figure}{chapter}
\counterwithin{table}{chapter}''',
}
It runs OK in texlive2017 but have a redefined error in texlive2018. If I remove \usepackage{chngcntr}, then texlive2018 works, but texlive2017 have a undefined error. Certainly, it is triggered by some changes in newer version of texlive. But I am wondering if there is a way so that it works on both texlive version.
Indeed the macros of chngcntr have been moved to the LaTeX format with TeXLive2018.
A new version of chngcntr package starts with this
% version 1.1 this package has been adoped into the format so does not
% need to do anything in current latex releases.
\#ifundefined{counterwithout}{}{%
\PackageInfo{chngcntr}{\string\counterwithout\space already defined.\MessageBreak
Quitting chngcntr}%
\endinput
}
Thus all should be find if your TeXLive2018 has the v1.1a 2018/04/09 version of the chngctr package. Please check. Is this the Info you see? this is not an Error.
Else you can always do (beware the r else double the backslashes)
latex_elements = {
'preamble': r'''\ifdefined\counterwithout\else\usepackage{chngcntr}\fi
\counterwithin{figure}{chapter}
\counterwithin{table}{chapter}''',
}
By the way there was a related issue with the LaTeX format, but it has been fixed since.
When I am using subfig package in latex, it gives some errors:
Package subfig Warning: Your document class has a bad definition
of \endfigure, most likely
\let\endfigure=\end#float
which has now been changed to
\def\endfigure{\end#float}
because otherwise subsequent changes to \end#float
(like done by several packages changing float behaviour)
can't take effect on \endfigure.
Please complain to your document class author.
Package subfig Warning: Your document class has a bad definition
of \endtable, most likely
\let\endtable=\end#float
which has now been changed to
\def\endtable{\end#float}
because otherwise subsequent changes to \end#float
(like done by several packages changing float behaviour)
can't take effect on \endtable.
Please complain to your document class author.
(/usr/share/texmf/tex/latex/caption/caption.sty
`rotating' package detected
`float' package detected
)
LaTeX Warning: You have requested, on input line 139, version
`2005/06/26' of package caption,
but only version
`1995/04/05 v1.4b caption package (AS)'
is available.
! Undefined control sequence.
l.163 \DeclareCaptionOption
{listofformat}{\caption#setlistofformat{#1}}
How can I solve it?
Thanks and regards!
It looks like a clash between subfig and an old version of the caption package. Try updating your caption package to something more recent. In general, it is a good idea to keep all packages updated to their latest versions.
When using the MnSymbol package, pdflatex gives two font warnings:
LaTeX Font Warning: Encoding 'OMS' has changed to 'U' for symbol font
(Font) 'symbols' in the math version 'normal' on input line 120.
LaTeX Font Info: Overwriting symbol font 'symbols' in version 'normal'
(Font) OMS/cmsy/m/n --> U/MnSymbolF/m/n on input line 120.
It turns out that this is probably due to a clash with the AMSSymb package.
Since I need just a few symbols from the package: is there a way to load one symbol from a package, in stead of all?
Here's how I solved this:
Download the perl script "makefakeMnSymbol" from the comprehensive latex symbol document source:
http://mirror.ctan.org/info/symbols/comprehensive/source/makefakeMnSymbol
Next, at command line do chmod +x makefakeMnSymbol to make it executable. Then, run
./makefakeMnSymbol `kpsewhich MnSymbol.sty` > fakeMnSymbol.sty
Put fakeMnSymbol.sty in a texmf directory of choice (global or local), and run texhash
If you now put
\usepackage{fakeMnSymbol}
in your preamble, you can now use any MnSymbol, like \powerset by prefixing it like \MNSpowerset
Big thanks to Scott Pakin for this hack... and for his comprehensive symbol guide...
This hack has problems with symbols in subscripts/superscripts. A work-around is to use look at the fakeMnSymbol.sty source to find which font the symbol you want was loaded from, along with its number. Here's an example from one of my preambles where I override the built-in \boxminus with an MnSymbol:
\usepackage[]{fakeMnSymbol}
\DeclareSymbolFont{mnsymbolc}{U}{MnSymbolC}{m}{n}
\let\boxminus=\undefined
\DeclareMathSymbol{\boxminus}{2}{mnsymbolc}{112}
These warnings are nothing to worry about. In fact, in the next LaTeX release they'll disappear (see the original bug report). No ETA on that, however.
Moreover, is there any real chance this affects the typesetting of the document?
Nope.
is there any way to prevent this?
Can patch the LaTeX warning message code before loading the package, and then restore it again afterwards (this is what I've done in the past in my own packages), but as a user I'd just learn to ignore the warning.
The following might help. This is the code I had to add in order to get just the \bigominus symbol out of the MnSymbol package.
\DeclareFontFamily{U}{MnSymbolF}{}<br>
\DeclareSymbolFont{mnsymbols}{U}{MnSymbolF}{m}{n}<br>
\DeclareFontShape{U}{MnSymbolF}{m}{n}{<br>
<-6> MnSymbolF5<br>
<6-7> MnSymbolF6<br>
<7-8> MnSymbolF7<br>
<8-9> MnSymbolF8<br>
<9-10> MnSymbolF9<br>
<10-12> MnSymbolF10<br>
<12-> MnSymbolF12}{}<br>
\DeclareMathSymbol{\bigominus}{\mathop}{mnsymbols}{55}