Single quotes do not seem to be scaled with xelatex and Source Code Pro

The problem is that the new TU-encoding now used by fontspec is missing suitable definitions for \textquotesingle and \textasciigrave (which were previously present in xunicode) and so the default definitions from textcomp kicks in. If I add definitions everything is fine.

Edit

The missing definitions have been added to the LaTeX-code. So after the next update of LaTeX is should work correctly out-of-the-box.

Edit 2

The code in my example works fine as only typewriter fonts are used. With a roman font it is more complicated as the "TeX-ligatures" interferes. Some discussion is going on.

\documentclass[12pt]{article}
\usepackage{fontspec}
\setmonofont[Scale=0.7]{Source Code Pro}
\DeclareTextSymbol{\textquotesingle}     \UnicodeEncodingName{"0027}
\DeclareTextSymbol{\textasciigrave}     \UnicodeEncodingName{"0060}


\usepackage{upquote}
\usepackage{textcomp}

\begin{document}

\texttt{'hello world'}

\texttt{\textquotesingle{}hello world\textquotesingle{}}

\begin{verbatim}
x = 'hello world'
\end{verbatim}

\end{document}

enter image description here


From the description of upquote on CTAN:

The pack­age switches the type­writer font to Com­puter Modern Typewriter in OT1 en­cod­ing, and mod­i­fies the be­haviour of ver­ba­tim, ver­ba­tim*, \verb, and \verb* to print in the “` and ' way”.

Your problem is that for any non-cm-font textcomp (an obsolete package) is loaded which also does not match your font. So you cannot use textcomp and because it depends on it, you cannot use upquote either.